345 lines
12 KiB
Java
345 lines
12 KiB
Java
<template>
|
|
<a-modal
|
|
:title="$t('batSetting')"
|
|
: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('implementationCategory')">{{$t('implementationCategory')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel">
|
|
<j-dict-select-tag class="box-input" v-model="formInline.implementType"
|
|
@input="handleInput('implementType')"
|
|
:placeholder="$t('PleaseSelect')+$t('implementationCategory')"
|
|
:type="'select'"
|
|
:triggerChange="false" dictCode="implement_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('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-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('zoneOfApplication')">{{$t('zoneOfApplication')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel-multi" prop="region">
|
|
<j-multi-select-tag class="box-input" v-model="formInline.region"
|
|
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
|
|
:type="'select'"
|
|
:triggerChange="false" :dictCode="'region'"/>
|
|
</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('vehicleInProductionDate')">{{$t('vehicleInProductionDate')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" :prop="'implementTime'">
|
|
<a-date-picker class="box-input"
|
|
:placeholder="$t('PleaseSelect')+$t('vehicleInProductionDate')"
|
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
|
@change="dateChange({db_field_name:'implementTime'})"
|
|
format="YYYY-MM-DD"
|
|
v-model="formInline.implementTime"
|
|
style="width: 100%"/>
|
|
</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('ImplementationDate')">{{$t('ImplementationDate')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel">
|
|
<a-date-picker class="box-input"
|
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
|
:placeholder="$t('PleaseSelect')+$t('ImplementationDate')"
|
|
@change="dateChange({db_field_name:'xin1Che1Xing2Shi2Shi1Ri4Qi1'})"
|
|
format="YYYY-MM-DD"
|
|
v-model="formInline.xin1Che1Xing2Shi2Shi1Ri4Qi1"
|
|
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('deadlineForConfirmationOfDesignCompliance')">
|
|
{{$t('deadlineForConfirmationOfDesignCompliance')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel">
|
|
<a-date-picker class="box-input"
|
|
:placeholder="$t('PleaseSelect')+$t('deadlineForConfirmationOfDesignCompliance')"
|
|
@change="dateChange({db_field_name:'designDueDate'})"
|
|
format="YYYY-MM-DD"
|
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
|
v-model="formInline.designDueDate"
|
|
:disabled="false"
|
|
style="width: 100%"/>
|
|
</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('prehomoConfirmationDeadline')">
|
|
{{$t('prehomoConfirmationDeadline')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel">
|
|
<a-date-picker class="box-input"
|
|
:placeholder="$t('PleaseSelect')+$t('prehomoConfirmationDeadline')"
|
|
@change="dateChange({db_field_name:'prehomoDueDate'})"
|
|
format="YYYY-MM-DD"
|
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
|
v-model="formInline.prehomoDueDate"
|
|
:disabled="false"
|
|
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('verificationComplianceConfirmationDeadline')">
|
|
{{$t('verificationComplianceConfirmationDeadline')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel">
|
|
<a-date-picker class="box-input"
|
|
:placeholder="$t('PleaseSelect')+$t('verificationComplianceConfirmationDeadline')"
|
|
@change="dateChange({db_field_name:'verifyDueDate'})"
|
|
format="YYYY-MM-DD"
|
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
|
v-model="formInline.verifyDueDate"
|
|
:disabled="false"
|
|
style="width: 100%"/>
|
|
</a-form-model-item>
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
</a-form-model>
|
|
</a-modal>
|
|
</template>
|
|
|
|
<script>
|
|
import { getAction, postAction } from '@/api/manage'
|
|
import moment from 'moment'
|
|
|
|
export default {
|
|
name: 'batSetting',
|
|
props: ['url'],
|
|
data() {
|
|
return {
|
|
visible: false,
|
|
confirmLoading: false,
|
|
formInline: {},
|
|
rules: {},
|
|
ids: []
|
|
}
|
|
},
|
|
mounted() {
|
|
},
|
|
methods: {
|
|
edit(data) {
|
|
this.visible = true
|
|
this.$nextTick(() => {
|
|
this.ids = data || []
|
|
this.formInline = {}
|
|
})
|
|
},
|
|
handleOk() {
|
|
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> |