529 lines
23 KiB
Java
529 lines
23 KiB
Java
<template>
|
|
<a-modal
|
|
:title="$t('batchSettingInformation')"
|
|
:width="1200"
|
|
:visible="visible"
|
|
:confirm-loading="confirmLoading"
|
|
:maskClosable="false"
|
|
@ok="handleOk"
|
|
@cancel="handleCancel"
|
|
>
|
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
|
<a-row :gutter="24">
|
|
<a-col :span="12">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text" :title="$t('certificationType')">{{$t('certificationType')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel">
|
|
<j-multi-select-tag class="box-input" v-model="formInline.attestationType"
|
|
:placeholder="$t('PleaseSelect')+$t('certificationType')"
|
|
:type="'select'"
|
|
:triggerChange="false" :dictCode="'attestation_type'"/>
|
|
<!-- <j-dict-select-tag class="box-input" v-model="formInline.attestationType"-->
|
|
<!-- @input="handleInput('attestationType')"-->
|
|
<!-- :placeholder="$t('PleaseSelect')+$t('certificationType')"-->
|
|
<!-- :type="'select'"-->
|
|
<!-- :triggerChange="false" dictCode="attestation_type"/>-->
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
<a-col :span="12">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text" :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel">
|
|
<j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
|
|
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
|
|
:type="'select'"
|
|
:triggerChange="false" :dictCode="'attestation_rank'"/>
|
|
<!-- <j-dict-select-tag class="box-input" v-model="formInline.attestationRank"-->
|
|
<!-- @input="handleInput('attestationRank')"-->
|
|
<!-- :placeholder="$t('PleaseSelect')+$t('certificationLevel')"-->
|
|
<!-- :type="'select'"-->
|
|
<!-- :triggerChange="false" dictCode="attestation_rank"/>-->
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
<a-row :gutter="24">
|
|
<a-col :span="12">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel-multi">
|
|
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
|
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
|
:type="'select'"
|
|
:triggerChange="false" :dictCode="'duty_territory'"/>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
<a-col :span="12">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text"
|
|
:title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" prop="designDutyId">
|
|
<PersonnelSelection :query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
|
|
:isSingleChoice="true"
|
|
:personneQuery="formInline"
|
|
v-if="visible"
|
|
@change="PersonnelSelectionChange"
|
|
v-model="formInline.engineeringInterfacePersonName"/>
|
|
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
|
|
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
|
|
<!-- @input="handleInput('designDuty')"-->
|
|
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
|
|
<!-- :type="'select'"-->
|
|
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
<a-row :gutter="24">
|
|
<a-col :span="12" v-if="this.code != '1'">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text"
|
|
:title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" prop="designDutyId">
|
|
<PersonnelSelection :query="{db_field_name:'regulatoryEngineer',db_field_txt:$t('regulatoryEngineer')}"
|
|
:isSingleChoice="true"
|
|
:personneQuery="formInline"
|
|
v-if="visible"
|
|
@change="PersonnelSelectionChange"
|
|
v-model="formInline.regulatoryEngineerName"/>
|
|
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
|
|
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
|
|
<!-- @input="handleInput('designDuty')"-->
|
|
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
|
|
<!-- :type="'select'"-->
|
|
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
<div class="header-text">
|
|
{{$t('confirmationOfDesignConformity')}}
|
|
</div>
|
|
<a-row :gutter="24">
|
|
<a-col :span="12">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text"
|
|
:title="$t('personLiable')">{{$t('personLiable')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" prop="designDutyId">
|
|
<PersonnelSelection :query="{db_field_name:'dutyPerson',db_field_txt:$t('personLiable')}"
|
|
:isSingleChoice="true"
|
|
:personneQuery="formInline"
|
|
v-if="visible"
|
|
@change="PersonnelSelectionChange"
|
|
v-model="formInline.dutyPersonName"/>
|
|
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
|
|
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
|
|
<!-- @input="handleInput('designDuty')"-->
|
|
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
|
|
<!-- :type="'select'"-->
|
|
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
<a-col :span="12">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text"
|
|
:title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" :prop="'verifyDueDate'">
|
|
<a-date-picker class="box-input"
|
|
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
|
|
@change="dateChange({db_field_name:'verifyDueDate'})"
|
|
format="YYYY-MM-DD"
|
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
|
v-model="formInline.verifyDueDate"
|
|
style="width: 100%"/>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
<!-- <a-col :span="12">-->
|
|
<!-- <div class="box-title-text">-->
|
|
<!-- <div class="title-text">-->
|
|
<!-- <span class="title-text-text"-->
|
|
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
|
|
<!-- </div>-->
|
|
<!-- <a-form-model-item class="itemModel" prop="designInitiatorId">-->
|
|
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"-->
|
|
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
|
|
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
|
|
<!-- class="box-input"-->
|
|
<!-- allowClear-->
|
|
<!-- v-model="formInline.designInitiatorId">-->
|
|
<!-- <a-select-option v-for="(item, key) in designInitiatorList"-->
|
|
<!-- :key="key"-->
|
|
<!-- :value="item.value">-->
|
|
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
|
|
<!-- {{ item.name }}-->
|
|
<!-- </span>-->
|
|
<!-- </a-select-option>-->
|
|
<!-- </a-select>-->
|
|
<!-- <!– <j-dict-select-tag class="box-input" v-model="formInline.designInitiator"–>-->
|
|
<!-- <!– :disabled="formInline.roleCode == 0 ? false : true"–>-->
|
|
<!-- <!– @input="handleInput('designInitiator')"–>-->
|
|
<!-- <!– :placeholder="$t('PleaseSelect')+$t('Sponsor')"–>-->
|
|
<!-- <!– :type="'select'"–>-->
|
|
<!-- <!– :triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>–>-->
|
|
<!-- </a-form-model-item>-->
|
|
<!-- </div>-->
|
|
<!-- </a-col>-->
|
|
</a-row>
|
|
<a-row :gutter="24">
|
|
<a-col :span="12">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text"
|
|
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" prop="typeOfDeliverables">
|
|
<a-tree-select
|
|
tree-node-filter-prop="title"
|
|
v-model="formInline.designDeliverableType"
|
|
:maxTagCount="1"
|
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
|
class="box-input"
|
|
style="width: 100%"
|
|
:tree-data="DeliverableTreeList"
|
|
tree-checkable
|
|
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
|
/>
|
|
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDeliverableType"-->
|
|
<!-- @input="handleInput('designDeliverableType')"-->
|
|
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
|
|
<!-- :type="'select'"-->
|
|
<!-- :triggerChange="false" :dictCode="'deliverable_template'"/>-->
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
<div class="header-text">
|
|
{{$t('verificationAndConformityconfirmation')}}
|
|
</div>
|
|
<a-row :gutter="24">
|
|
<a-col :span="12">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text"
|
|
:title="$t('personLiable')">{{$t('personLiable')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" prop="verifyDutyId">
|
|
<PersonnelSelection :query="{db_field_name:'dutyPerson',db_field_txt:$t('personLiable')}"
|
|
:isSingleChoice="true"
|
|
:personneQuery="formInline"
|
|
v-if="visible"
|
|
@change="PersonnelSelectionChange"
|
|
v-model="formInline.dutyPersonName"/>
|
|
<!-- <j-dict-select-tag class="box-input" v-model="formInline.verifyDuty"-->
|
|
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
|
|
<!-- @input="handleInput('verifyDuty')"-->
|
|
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
|
|
<!-- :type="'select'"-->
|
|
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
<a-col :span="12">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text"
|
|
:title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" :prop="'verifyDueDate'">
|
|
<a-date-picker class="box-input"
|
|
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
|
|
@change="dateChange({db_field_name:'verifyDueDate'})"
|
|
format="YYYY-MM-DD"
|
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
|
v-model="formInline.verifyDueDate"
|
|
style="width: 100%"/>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
<!-- <a-col :span="12">-->
|
|
<!-- <div class="box-title-text">-->
|
|
<!-- <div class="title-text">-->
|
|
<!-- <span class="title-text-text"-->
|
|
<!-- :title="$t('Sponsor')">{{$t('Sponsor')}}</span>-->
|
|
<!-- </div>-->
|
|
<!-- <a-form-model-item class="itemModel" prop="verifyInitiatorId">-->
|
|
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Sponsor')"-->
|
|
<!-- class="box-input"-->
|
|
<!-- allowClear-->
|
|
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
|
|
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
|
|
<!-- v-model="formInline.verifyInitiatorId">-->
|
|
<!-- <a-select-option v-for="(item, key) in verifyInitiatorList"-->
|
|
<!-- :key="key"-->
|
|
<!-- :value="item.value">-->
|
|
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
|
|
<!-- {{ item.name }}-->
|
|
<!-- </span>-->
|
|
<!-- </a-select-option>-->
|
|
<!-- </a-select>-->
|
|
<!-- <!– <j-dict-select-tag class="box-input" v-model="formInline.verifyInitiator"–>-->
|
|
<!-- <!– :disabled="formInline.roleCode == 0 ? false : true"–>-->
|
|
<!-- <!– @input="handleInput('verifyInitiator')"–>-->
|
|
<!-- <!– :placeholder="$t('PleaseSelect')+$t('Sponsor')"–>-->
|
|
<!-- <!– :type="'select'"–>-->
|
|
<!-- <!– :triggerChange="false" :dictCode="'fa1_qi3_ren2'"/>–>-->
|
|
<!-- </a-form-model-item>-->
|
|
<!-- </div>-->
|
|
<!-- </a-col>-->
|
|
</a-row>
|
|
<a-row :gutter="24">
|
|
<a-col :span="12">
|
|
<div class="box-title-text">
|
|
<div class="title-text">
|
|
<span class="title-text-text"
|
|
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" prop="verifyDeliverableType">
|
|
<a-tree-select
|
|
tree-node-filter-prop="title"
|
|
v-model="formInline.verifyDeliverableType"
|
|
:maxTagCount="1"
|
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
|
class="box-input"
|
|
style="width: 100%"
|
|
:tree-data="DeliverableTreeList"
|
|
tree-checkable
|
|
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
|
/>
|
|
<!-- <j-dict-select-tag class="box-input" v-model="formInline.verifyDeliverableType"-->
|
|
<!-- :disabled="formInline.taskAffirmStatus != 'Not started' && !formInline.verifyDeliverableType ? true : false"-->
|
|
<!-- @input="handleInput('verifyDeliverableType')"-->
|
|
<!-- :placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"-->
|
|
<!-- :type="'select'"-->
|
|
<!-- :triggerChange="false" :dictCode="'deliverable_template'"/>-->
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
</a-form-model>
|
|
</a-modal>
|
|
</template>
|
|
|
|
<script>
|
|
import { getAction, postAction } from '@/api/manage'
|
|
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
|
import moment from 'moment'
|
|
|
|
export default {
|
|
name: 'batSetting',
|
|
props: ['url'],
|
|
components: {
|
|
PersonnelSelection
|
|
},
|
|
data() {
|
|
return {
|
|
visible: false,
|
|
confirmLoading: false,
|
|
designDutyList: [],
|
|
DeliverableTreeList: [],
|
|
formInline: {},
|
|
rules: {},
|
|
ids: [],
|
|
code:'',
|
|
}
|
|
},
|
|
mounted() {
|
|
},
|
|
methods: {
|
|
PersonnelSelectionChange(value, id) {
|
|
this.formInline[value] = id
|
|
this.formInline = { ...this.formInline }
|
|
},
|
|
edit(data,code) {
|
|
this.visible = true
|
|
this.getDeliverableTree()
|
|
this.code = code
|
|
console.log(this.code)
|
|
this.$nextTick(() => {
|
|
this.ids = data || []
|
|
this.formInline = {}
|
|
})
|
|
},
|
|
handleOk() {
|
|
if (this.formInline.dutyTerritory) {
|
|
this.handleOkTwo()
|
|
} else {
|
|
this.handleOkOne()
|
|
}
|
|
},
|
|
getDeliverableTree() {
|
|
getAction('/sys/category/getDeliverableTree', {}).then((res) => {
|
|
if (res.success) {
|
|
this.DeliverableTreeList = res.result
|
|
} else {
|
|
this.DeliverableTreeList = []
|
|
}
|
|
})
|
|
},
|
|
handleOkOne() {
|
|
let ids = JSON.parse(JSON.stringify(this.ids))
|
|
let query = {
|
|
ids: ids.join(','),
|
|
...this.formInline
|
|
}
|
|
this.confirmLoading = true
|
|
postAction(this.url.setBatch, query).then((res) => {
|
|
if (res.success) {
|
|
this.$message.success(this.$t('OperationSuccessful'))
|
|
this.visible = false
|
|
this.confirmLoading = false
|
|
this.$emit('batSettingList')
|
|
} else {
|
|
this.$message.warning(this.$t('operationFailed'))
|
|
this.confirmLoading = false
|
|
}
|
|
})
|
|
},
|
|
handleOkTwo() {
|
|
let _this = this
|
|
this.$confirm({
|
|
content: _this.$t('areResponsibilityAreaInformationBatch'),
|
|
onOk() {
|
|
let ids = JSON.parse(JSON.stringify(_this.ids))
|
|
let query = {
|
|
ids: ids.join(','),
|
|
..._this.formInline
|
|
}
|
|
_this.confirmLoading = true
|
|
postAction(_this.url.setBatch, query).then((res) => {
|
|
if (res.success) {
|
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
|
_this.visible = false
|
|
_this.confirmLoading = false
|
|
_this.$emit('batSettingList')
|
|
} else {
|
|
_this.$message.warning(_this.$t('operationFailed'))
|
|
_this.confirmLoading = false
|
|
}
|
|
})
|
|
}
|
|
})
|
|
},
|
|
handleCancel() {
|
|
this.formInline = {}
|
|
this.visible = false
|
|
},
|
|
handleInput(value) {
|
|
this.$nextTick(() => {
|
|
this.formInline = { ...this.formInline }
|
|
this.$refs.ruleForm.validateField([value])
|
|
})
|
|
},
|
|
dateChange(item) {
|
|
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
.formAdd .ant-form-item-label {
|
|
width: 130px;
|
|
}
|
|
|
|
.formAdd .ant-form-item-control-wrapper {
|
|
display: inline-block;
|
|
width: 100%;
|
|
}
|
|
|
|
/*.formAdd .ant-form-item {*/
|
|
/* margin-bottom: 20px;*/
|
|
/*}*/
|
|
|
|
.itemModel .ant-form-item-control-wrapper {
|
|
width: 100%;
|
|
}
|
|
|
|
.box-input .ant-select-selection--single {
|
|
height: 38px;
|
|
}
|
|
|
|
.box-input .ant-select-selection--multiple {
|
|
height: 38px;
|
|
}
|
|
|
|
.box-input .ant-select-selection__rendered {
|
|
line-height: 38px;
|
|
height: 38px;
|
|
}
|
|
|
|
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.box-input .ant-calendar-picker {
|
|
line-height: 38px;
|
|
height: 38px;
|
|
}
|
|
|
|
.box-input .ant-calendar-picker-input {
|
|
height: 38px;
|
|
}
|
|
|
|
.box-input .ant-input-number-input-wrap {
|
|
line-height: 38px;
|
|
height: 38px;
|
|
}
|
|
|
|
.box-input .ant-calendar-picker-input {
|
|
padding: 4px 30px 4px 11px;
|
|
}
|
|
</style>
|
|
<style scoped>
|
|
.box-title-text {
|
|
line-height: 1.4;
|
|
display: flex;
|
|
}
|
|
|
|
.title-text {
|
|
width: 174px;
|
|
text-align: right;
|
|
display: inline-block;
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
margin-right: 16px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
height: 42px;
|
|
line-height: 42px;
|
|
}
|
|
|
|
.box-input {
|
|
display: inline-block;
|
|
height: 38px;
|
|
width: 100%;
|
|
}
|
|
|
|
.itemModel {
|
|
width: calc(100% - 130px);
|
|
display: inline-block;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.title-text-text {
|
|
margin-top: 9px;
|
|
}
|
|
|
|
.formAdd {
|
|
margin-bottom: 40px;
|
|
}
|
|
</style> |