对接认证清单增删改查
This commit is contained in:
@@ -1394,4 +1394,5 @@ module.exports = {
|
|||||||
nameOfManufacturer:'Name Of Manufacturer',
|
nameOfManufacturer:'Name Of Manufacturer',
|
||||||
regulationNo:'Regulation No',
|
regulationNo:'Regulation No',
|
||||||
itemInformation:'Item Information',
|
itemInformation:'Item Information',
|
||||||
|
modifyHistory:'Modify History',
|
||||||
}
|
}
|
||||||
@@ -1495,4 +1495,5 @@ module.exports = {
|
|||||||
nameOfManufacturer:'生产企业名称',
|
nameOfManufacturer:'生产企业名称',
|
||||||
regulationNo:'法规编号',
|
regulationNo:'法规编号',
|
||||||
itemInformation:'条目信息',
|
itemInformation:'条目信息',
|
||||||
|
modifyHistory:'修改历史',
|
||||||
}
|
}
|
||||||
+266
-50
@@ -20,12 +20,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="serialNumber">
|
<a-form-model-item class="itemModel" prop="serialNumber">
|
||||||
<a-select :placeholder="$t('PleaseSelect')+$t('regulationNo')"
|
<a-select :placeholder="$t('PleaseSelect')+$t('regulationNo')"
|
||||||
v-model="formInline.serialNumber">
|
@change="serialNumberChange"
|
||||||
|
v-model="formInline.bussDocumentLibraryId">
|
||||||
<a-select-option v-for="(item, key) in projectNameList"
|
<a-select-option v-for="(item, key) in projectNameList"
|
||||||
:key="key"
|
:key="key"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
<span style="display: inline-block;width: 100%" :title=" item.serialNumber ">
|
||||||
{{ item.projectName}}
|
{{ item.serialNumber}}
|
||||||
</span>
|
</span>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -46,12 +47,167 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<div v-for="(item,index) in formInline.dataList" :key="index">
|
<div v-if="!formInline.id">
|
||||||
<div class="header-text">
|
<div v-for="(item,index) in formInline.dataList" :key="index">
|
||||||
{{$t('itemInformation')}}
|
<div class="header-text">
|
||||||
<a-icon class="icon-text" @click="addClick(index)" type="plus-circle"/>
|
{{$t('itemInformation')}}
|
||||||
<a-icon class="icon-text" @click="deleteClick(index)" type="minus-circle"/>
|
<a-icon class="icon-text" @click="addClick(index)" type="plus-circle"/>
|
||||||
|
<a-icon class="icon-text" v-if="formInline.dataList.length > 1" @click="deleteClick(index)"
|
||||||
|
type="minus-circle"/>
|
||||||
|
</div>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('category')">{{$t('category')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item
|
||||||
|
class="itemModel"
|
||||||
|
:prop="'dataList.'+index+'.category'"
|
||||||
|
:rules="[{ required: true, message: $t('category') + $t('cannotEmpty'), trigger: 'blur'},
|
||||||
|
{max: 300,message: $t('category') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
|
||||||
|
}]"
|
||||||
|
>
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model="item.category"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('category')"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('inspectionItems')">{{$t('inspectionItems')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel"
|
||||||
|
:prop="'dataList.'+index+'.inspectionItem'"
|
||||||
|
:rules="[{ required: true, message: $t('inspectionItems') + $t('cannotEmpty'), trigger: 'blur'},
|
||||||
|
{max: 300,message: $t('inspectionItems') + $t('cannotExceed') + 300 + $t('Characters'),trigger: 'blur'
|
||||||
|
}]">
|
||||||
|
<a-input class="box-input"
|
||||||
|
v-model="item.inspectionItem"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('inspectionItems')"/>
|
||||||
|
</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="Required">*</span>
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi"
|
||||||
|
style="display: inline-block"
|
||||||
|
:prop="'dataList.'+index+'.deliverableType'"
|
||||||
|
:rules="[{ required: true, message: $t('typeOfDeliverables') + $t('cannotEmpty'), trigger: 'change'},]"
|
||||||
|
>
|
||||||
|
<a-tree-select
|
||||||
|
tree-node-filter-prop="title"
|
||||||
|
v-model="item.deliverableType"
|
||||||
|
:maxTagCount="1"
|
||||||
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
|
class="box-input"
|
||||||
|
style="width: 100%"
|
||||||
|
:tree-data="DeliverableTreeList"
|
||||||
|
tree-checkable
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('typeOfDeliverables')"
|
||||||
|
/>
|
||||||
|
</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('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="deliverableTemplate">
|
||||||
|
<a-button type="primary" class="button-text"
|
||||||
|
@click="clickButtonToUpload('deliverableTemplate',index)">
|
||||||
|
{{ (item.deliverableTemplate === 'null' || item.deliverableTemplate === ''
|
||||||
|
||
|
||||||
|
item.deliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||||
|
}}
|
||||||
|
</a-button>
|
||||||
|
</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="Required">*</span>
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel"
|
||||||
|
:prop="'dataList.'+index+'.dutyTerritory'"
|
||||||
|
:rules="[{ required: true, message: $t('areaOfResponsibility') + $t('cannotEmpty'), trigger: 'change'},]"
|
||||||
|
>
|
||||||
|
<j-dict-select-tag class="box-input" v-model="item.dutyTerritory"
|
||||||
|
@input="handleInput('dataList.'+index+'.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="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi"
|
||||||
|
:prop="'dataList.'+index+'.sdtName'"
|
||||||
|
:rules="[{ required: true, message: $t('engineeringInterfacePerson') + $t('cannotEmpty'), trigger: 'change'},]"
|
||||||
|
>
|
||||||
|
<PersonnelSelection
|
||||||
|
:query="{db_field_name:'sdt',db_field_txt:$t('engineeringInterfacePerson'),subscript:index}"
|
||||||
|
:personneQuery="item"
|
||||||
|
:isSingleChoice="true"
|
||||||
|
@change="PersonnelSelectionChange"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="item.sdtName"/>
|
||||||
|
</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="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('personLiable')">{{$t('personLiable')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel-multi"
|
||||||
|
:prop="'dataList.'+index+'.dutyPersonName'"
|
||||||
|
:rules="[{ required: true, message: $t('personLiable') + $t('cannotEmpty'), trigger: 'change'},]"
|
||||||
|
>
|
||||||
|
<PersonnelSelection
|
||||||
|
:query="{db_field_name:'dutyPerson',db_field_txt:$t('personLiable'),subscript:index}"
|
||||||
|
:personneQuery="item"
|
||||||
|
:isSingleChoice="true"
|
||||||
|
@change="PersonnelSelectionChange"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="item.dutyPersonName"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
@@ -59,7 +215,10 @@
|
|||||||
<span class="Required">*</span>
|
<span class="Required">*</span>
|
||||||
<span class="title-text-text" :title="$t('category')">{{$t('category')}}</span>
|
<span class="title-text-text" :title="$t('category')">{{$t('category')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="category">
|
<a-form-model-item
|
||||||
|
class="itemModel"
|
||||||
|
prop="category"
|
||||||
|
>
|
||||||
<a-input class="box-input"
|
<a-input class="box-input"
|
||||||
v-model="formInline.category"
|
v-model="formInline.category"
|
||||||
:placeholder="$t('PleaseEnter')+$t('category')"/>
|
:placeholder="$t('PleaseEnter')+$t('category')"/>
|
||||||
@@ -72,7 +231,8 @@
|
|||||||
<span class="Required">*</span>
|
<span class="Required">*</span>
|
||||||
<span class="title-text-text" :title="$t('inspectionItems')">{{$t('inspectionItems')}}</span>
|
<span class="title-text-text" :title="$t('inspectionItems')">{{$t('inspectionItems')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="inspectionItem">
|
<a-form-model-item class="itemModel"
|
||||||
|
:prop="'inspectionItem'">
|
||||||
<a-input class="box-input"
|
<a-input class="box-input"
|
||||||
v-model="formInline.inspectionItem"
|
v-model="formInline.inspectionItem"
|
||||||
:placeholder="$t('PleaseEnter')+$t('inspectionItems')"/>
|
:placeholder="$t('PleaseEnter')+$t('inspectionItems')"/>
|
||||||
@@ -88,7 +248,10 @@
|
|||||||
<span class="Required">*</span>
|
<span class="Required">*</span>
|
||||||
<span class="title-text-text" :title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
<span class="title-text-text" :title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="deliverableType">
|
<a-form-model-item class="itemModel-multi"
|
||||||
|
style="display: inline-block"
|
||||||
|
:prop="'deliverableType'"
|
||||||
|
>
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
tree-node-filter-prop="title"
|
tree-node-filter-prop="title"
|
||||||
v-model="formInline.deliverableType"
|
v-model="formInline.deliverableType"
|
||||||
@@ -130,11 +293,14 @@
|
|||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi" prop="dutyTerritory">
|
<a-form-model-item class="itemModel"
|
||||||
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
:prop="'dutyTerritory'"
|
||||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
>
|
||||||
:type="'select'"
|
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
||||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
@input="handleInput('dutyTerritory')"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||||
|
:type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -144,10 +310,13 @@
|
|||||||
<span class="Required">*</span>
|
<span class="Required">*</span>
|
||||||
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
|
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi" :prop="'sdtName'">
|
<a-form-model-item class="itemModel-multi"
|
||||||
|
:prop="'sdtName'"
|
||||||
|
>
|
||||||
<PersonnelSelection
|
<PersonnelSelection
|
||||||
:query="{db_field_name:'sdt',db_field_txt:$t('engineeringInterfacePerson')}"
|
:query="{db_field_name:'sdt',db_field_txt:$t('engineeringInterfacePerson')}"
|
||||||
:personneQuery="formInline"
|
:personneQuery="formInline"
|
||||||
|
:isSingleChoice="true"
|
||||||
@change="PersonnelSelectionChange"
|
@change="PersonnelSelectionChange"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-model="formInline.sdtName"/>
|
v-model="formInline.sdtName"/>
|
||||||
@@ -163,10 +332,13 @@
|
|||||||
<span class="Required">*</span>
|
<span class="Required">*</span>
|
||||||
<span class="title-text-text" :title="$t('personLiable')">{{$t('personLiable')}}</span>
|
<span class="title-text-text" :title="$t('personLiable')">{{$t('personLiable')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi" :prop="'dutyPersonName'">
|
<a-form-model-item class="itemModel-multi"
|
||||||
|
:prop="'dutyPersonName'"
|
||||||
|
>
|
||||||
<PersonnelSelection
|
<PersonnelSelection
|
||||||
:query="{db_field_name:'dutyPerson',db_field_txt:$t('personLiable')}"
|
:query="{db_field_name:'dutyPerson',db_field_txt:$t('personLiable')}"
|
||||||
:personneQuery="formInline"
|
:personneQuery="formInline"
|
||||||
|
:isSingleChoice="true"
|
||||||
@change="PersonnelSelectionChange"
|
@change="PersonnelSelectionChange"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-model="formInline.dutyPersonName"/>
|
v-model="formInline.dutyPersonName"/>
|
||||||
@@ -175,7 +347,6 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <a-row :gutter="24">-->
|
<!-- <a-row :gutter="24">-->
|
||||||
<!-- <a-col :span="24">-->
|
<!-- <a-col :span="24">-->
|
||||||
<!-- <div class="box-title-text">-->
|
<!-- <div class="box-title-text">-->
|
||||||
@@ -213,7 +384,6 @@
|
|||||||
PersonnelSelection,
|
PersonnelSelection,
|
||||||
uploadFile
|
uploadFile
|
||||||
},
|
},
|
||||||
props: ['url'],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formInline: {},
|
formInline: {},
|
||||||
@@ -242,11 +412,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
category: [
|
category: [
|
||||||
{
|
{ required: true, message: this.$t('category') + this.$t('cannotEmpty'), trigger: 'blur' },
|
||||||
required: true,
|
|
||||||
message: this.$t('category') + this.$t('regulationNo'),
|
|
||||||
trigger: 'change'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
max: 300,
|
max: 300,
|
||||||
message: this.$t('category') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
message: this.$t('category') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||||
@@ -254,11 +420,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
inspectionItem: [
|
inspectionItem: [
|
||||||
{
|
{ required: true, message: this.$t('inspectionItems') + this.$t('cannotEmpty'), trigger: 'blur' },
|
||||||
required: true,
|
|
||||||
message: this.$t('inspectionItems') + this.$t('regulationNo'),
|
|
||||||
trigger: 'change'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
max: 300,
|
max: 300,
|
||||||
message: this.$t('inspectionItems') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
message: this.$t('inspectionItems') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||||
@@ -266,11 +428,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
deliverableType: [
|
deliverableType: [
|
||||||
{
|
{ required: true, message: this.$t('typeOfDeliverables') + this.$t('cannotEmpty'), trigger: 'change' }
|
||||||
required: true,
|
|
||||||
message: this.$t('typeOfDeliverables') + this.$t('cannotEmpty'),
|
|
||||||
trigger: 'change'
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
dutyTerritory: [
|
dutyTerritory: [
|
||||||
{
|
{
|
||||||
@@ -299,10 +457,17 @@
|
|||||||
title: '',
|
title: '',
|
||||||
DeliverableTreeList: [],
|
DeliverableTreeList: [],
|
||||||
uploadName: '',
|
uploadName: '',
|
||||||
|
numIndex: 0,
|
||||||
|
url: {
|
||||||
|
add: '/project/projectCertificationInventoryEO/batchAdd',
|
||||||
|
edit: '/project/projectCertificationInventoryEO/edit',
|
||||||
|
list: '/project/projectLawsInventoryEO/list'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDeliverableTree()
|
this.getDeliverableTree()
|
||||||
|
this.getRegulationNo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
@@ -315,18 +480,23 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
addModel() {
|
addModel() {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.title = this.$t('add')
|
this.title = this.$t('add')
|
||||||
this.formInline = {}
|
this.formInline = {}
|
||||||
|
this.getRegulationNo()
|
||||||
this.formInline.dataList = [{}]
|
this.formInline.dataList = [{}]
|
||||||
this.formInline = {...this.formInline}
|
this.formInline = { ...this.formInline }
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.ruleForm.clearValidate()
|
this.$refs.ruleForm.clearValidate()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
editModel(value) {
|
editModel(value) {
|
||||||
|
this.formInline = {}
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
this.formInline = value
|
||||||
|
this.getRegulationNo()
|
||||||
this.title = this.$t('edit')
|
this.title = this.$t('edit')
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.ruleForm.clearValidate()
|
this.$refs.ruleForm.clearValidate()
|
||||||
@@ -340,26 +510,35 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
let url = ''
|
let url = ''
|
||||||
let Action
|
let Action
|
||||||
|
let query = JSON.parse(JSON.stringify(this.formInline))
|
||||||
if (this.formInline.id) {
|
if (this.formInline.id) {
|
||||||
url = this.url.edit
|
url = this.url.edit
|
||||||
Action = putAction
|
Action = putAction
|
||||||
|
Object.keys(query).forEach(res => {
|
||||||
|
if (query[res] && query[res] instanceof Array) {
|
||||||
|
query[res] = query[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
query.projectLibraryId = this.$route.query.id
|
||||||
} else {
|
} else {
|
||||||
url = this.url.add
|
url = this.url.add
|
||||||
Action = postAction
|
Action = postAction
|
||||||
|
query.dataList.forEach(val => {
|
||||||
|
Object.keys(val).forEach(res => {
|
||||||
|
if (val[res] && val[res] instanceof Array) {
|
||||||
|
val[res] = val[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
query.projectLibraryId = this.$route.query.id
|
||||||
}
|
}
|
||||||
let query = JSON.parse(JSON.stringify(this.formInline))
|
|
||||||
Object.keys(query).forEach(res => {
|
|
||||||
if (query[res] && query[res] instanceof Array) {
|
|
||||||
query[res] = query[res].join(',')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
Action(url, query).then((res) => {
|
Action(url, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.$emit('addModelList')
|
this.$emit('addModelForm')
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
@@ -374,11 +553,16 @@
|
|||||||
this.$refs.ruleForm.validateField([value])
|
this.$refs.ruleForm.validateField([value])
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
PersonnelSelectionChange(value, id) {
|
PersonnelSelectionChange(value, id, index) {
|
||||||
this.formInline[value] = id
|
if (this.formInline.id) {
|
||||||
|
this.formInline[value] = id
|
||||||
|
} else {
|
||||||
|
this.formInline.dataList[index][value] = id
|
||||||
|
}
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
},
|
},
|
||||||
clickButtonToUpload(item) {
|
clickButtonToUpload(item, index) {
|
||||||
|
this.numIndex = index
|
||||||
this.$refs.uploadFile.perentHandleFunc()
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
this.$refs.uploadFile.visible = true
|
this.$refs.uploadFile.visible = true
|
||||||
this.uploadName = item
|
this.uploadName = item
|
||||||
@@ -399,13 +583,41 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
/** 赋值给当前对应的表单文件 */
|
/** 赋值给当前对应的表单文件 */
|
||||||
this.formInline[this.uploadName] = attIdList.join(',')
|
if (this.formInline.id) {
|
||||||
|
this.formInline[this.uploadName] = attIdList.join(',')
|
||||||
|
} else {
|
||||||
|
this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',')
|
||||||
|
}
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
},
|
},
|
||||||
addClick(index){
|
addClick(index) {
|
||||||
this.formInline.dataList.splice(1,index,{})
|
this.formInline.dataList.splice(index + 1, 0, {})
|
||||||
this.formInline = {...this.formInline}
|
this.formInline = { ...this.formInline }
|
||||||
},
|
},
|
||||||
|
deleteClick(index) {
|
||||||
|
this.formInline.dataList.splice(index, 1)
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
getRegulationNo() {
|
||||||
|
let query = {
|
||||||
|
projectLibraryId: this.$route.query.id,
|
||||||
|
roleCode: 0
|
||||||
|
}
|
||||||
|
getAction(this.url.list, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.projectNameList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.projectNameList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
serialNumberChange(value) {
|
||||||
|
let content = this.projectNameList.filter(res => {
|
||||||
|
return res.id === value
|
||||||
|
})
|
||||||
|
this.formInline.bussDocumentLibraryId = content[0].id
|
||||||
|
this.formInline.serialNumber = content[0].serialNumber
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -539,6 +751,10 @@
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-form-item-with-help {
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.ant-input-disabled {
|
.ant-input-disabled {
|
||||||
|
|||||||
+13
-12
@@ -37,11 +37,12 @@
|
|||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi">
|
<a-form-model-item class="itemModel">
|
||||||
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
||||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
@input="handleInput('dutyTerritory')"
|
||||||
:type="'select'"
|
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
:type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -57,7 +58,7 @@
|
|||||||
class="box-input"
|
class="box-input"
|
||||||
allowClear
|
allowClear
|
||||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||||
v-model="formInline.configurationItem">
|
v-model="formInline.sdt">
|
||||||
<a-select-option v-for="(item, key) in engineeringInterfacePersonList"
|
<a-select-option v-for="(item, key) in engineeringInterfacePersonList"
|
||||||
:key="item.key"
|
:key="item.key"
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
@@ -75,12 +76,12 @@
|
|||||||
<span class="title-text-text" :title="$t('personLiable')">{{$t('personLiable')}}</span>
|
<span class="title-text-text" :title="$t('personLiable')">{{$t('personLiable')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi">
|
<a-form-model-item class="itemModel-multi">
|
||||||
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('personLiable')}"
|
<PersonnelSelection :query="{db_field_name:'dutyPerson',db_field_txt:$t('personLiable')}"
|
||||||
:isSingleChoice="true"
|
:isSingleChoice="true"
|
||||||
:personneQuery="formInline"
|
:personneQuery="formInline"
|
||||||
v-if="visible"
|
v-if="visible"
|
||||||
@change="PersonnelSelectionChange"
|
@change="PersonnelSelectionChange"
|
||||||
v-model="formInline.studioEngineerName"/>
|
v-model="formInline.dutyPersonName"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -147,11 +148,11 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleOk() {
|
handleOk() {
|
||||||
if (this.formInline.dutyTerritory) {
|
// if (this.formInline.dutyTerritory) {
|
||||||
this.handleOkTwo()
|
// this.handleOkTwo()
|
||||||
} else {
|
// } else {
|
||||||
this.handleOkOne()
|
this.handleOkOne()
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
PersonnelSelectionChange(value, id) {
|
PersonnelSelectionChange(value, id) {
|
||||||
this.formInline[value] = id
|
this.formInline[value] = id
|
||||||
|
|||||||
@@ -142,41 +142,17 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
>
|
>
|
||||||
<span slot="operation" slot-scope="text,record">
|
<span slot="operation" slot-scope="text,record">
|
||||||
<a class="text-operation"
|
<a class="text-operation" @click="edit(record)">
|
||||||
v-if="(record.inventoryAffirmStatus == 'List to confirm' &&
|
|
||||||
((record.roleCode == 1 && !record.regulationOwnerSubmitStatus) ||
|
|
||||||
(record.roleCode == 2 && !record.homologationEngineerSubmitStatus) ||
|
|
||||||
(record.roleCode == 4 && !record.regulationOwnerSubmitStatus && !record.homologationEngineerSubmitStatus)))
|
|
||||||
|| (record.roleCode == 0 && record.taskAffirmStatus != 'List to confirm')"
|
|
||||||
@click="edit(record)">
|
|
||||||
{{ $t('edit') }}
|
{{ $t('edit') }}
|
||||||
</a>
|
</a>
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
v-else
|
@click="modifyHistoryClick(record)">
|
||||||
@click="viewClick(record)">
|
{{ $t('modifyHistory') }}
|
||||||
{{ $t('view') }}
|
|
||||||
</a>
|
</a>
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
v-if="(record.inventoryAffirmStatus == 'Not started' || record.inventoryAffirmStatus == 'Rejected') && record.roleCode == 0"
|
|
||||||
@click="deleteLib(record)">
|
@click="deleteLib(record)">
|
||||||
{{ $t('deleteLib') }}
|
{{ $t('deleteLib') }}
|
||||||
</a>
|
</a>
|
||||||
<a class="text-operation"
|
|
||||||
@click="resultReportedClick(record)">
|
|
||||||
{{ $t('resultReported') }}
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
<span slot="operationOne" slot-scope="text,record">
|
|
||||||
<a class="text-operation"
|
|
||||||
@click="viewClick(record)">
|
|
||||||
{{ $t('view') }}
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
<span slot="titleName" slot-scope="text,record" :title="text">
|
|
||||||
<span class="textName">
|
|
||||||
{{ text }}
|
|
||||||
</span>
|
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -216,8 +192,9 @@
|
|||||||
list: '/project/projectCertificationInventoryEO/page',
|
list: '/project/projectCertificationInventoryEO/page',
|
||||||
exportTemplate: '',
|
exportTemplate: '',
|
||||||
exportData: '',
|
exportData: '',
|
||||||
deleteBatch: '',
|
deleteBatch: '/project/projectCertificationInventoryEO/deleteBatch',
|
||||||
setBatch: ''
|
setBatch: '/project/projectCertificationInventoryEO/setBatch',
|
||||||
|
deleteOne: '/project/projectCertificationInventoryEO/delete'
|
||||||
},
|
},
|
||||||
processStatusList: [],
|
processStatusList: [],
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
@@ -348,6 +325,9 @@
|
|||||||
isDisplayNum: 2
|
isDisplayNum: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
searchQuery() {
|
searchQuery() {
|
||||||
this.selectedRowKeys = []
|
this.selectedRowKeys = []
|
||||||
@@ -393,7 +373,7 @@
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.dataSource = res.result || []
|
this.dataSource = res.result.records || []
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.JLoading = false
|
this.JLoading = false
|
||||||
} else {
|
} else {
|
||||||
@@ -406,7 +386,11 @@
|
|||||||
this.$refs.transferListRef.transferModel()
|
this.$refs.transferListRef.transferModel()
|
||||||
},
|
},
|
||||||
BatchSettingClick() {
|
BatchSettingClick() {
|
||||||
this.$refs.batSettingRef.edit()
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0){
|
||||||
|
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
|
||||||
|
}else{
|
||||||
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
|
}
|
||||||
},
|
},
|
||||||
certificationClick() {
|
certificationClick() {
|
||||||
this.$refs.certificationDirectoryRef.addModel()
|
this.$refs.certificationDirectoryRef.addModel()
|
||||||
@@ -433,26 +417,26 @@
|
|||||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
let _this = this
|
let _this = this
|
||||||
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||||||
let isTrue = false
|
let isTrue = true
|
||||||
for (let i = 0; i < this.dataSource.length; i++) {
|
// for (let i = 0; i < this.dataSource.length; i++) {
|
||||||
for (let j = 0; j < selectedRowKeys.length; j++) {
|
// for (let j = 0; j < selectedRowKeys.length; j++) {
|
||||||
if (this.dataSource[i].id == selectedRowKeys[j]) {
|
// if (this.dataSource[i].id == selectedRowKeys[j]) {
|
||||||
if (this.dataSource[i].inventoryAffirmStatus == 'Not started' || this.dataSource[i].inventoryAffirmStatus == 'Rejected') {
|
// if (this.dataSource[i].inventoryAffirmStatus == 'Not started' || this.dataSource[i].inventoryAffirmStatus == 'Rejected') {
|
||||||
isTrue = true
|
// isTrue = true
|
||||||
} else {
|
// } else {
|
||||||
isTrue = false
|
// isTrue = false
|
||||||
this.$message.warning(this.$t('onlyDeleted'))
|
// this.$message.warning(this.$t('onlyDeleted'))
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (isTrue) {
|
if (isTrue) {
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
content: _this.$t('ConfirmBatchDeletion'),
|
content: _this.$t('ConfirmBatchDeletion'),
|
||||||
onOk() {
|
onOk() {
|
||||||
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||||||
postAction(_this.url.deleteBatch, {
|
deleteAction(_this.url.deleteBatch, {
|
||||||
ids: idList.join(','),
|
ids: idList.join(','),
|
||||||
projectLibraryId: _this.$route.query.id
|
projectLibraryId: _this.$route.query.id
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
@@ -490,9 +474,32 @@
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
batSettingForm() {
|
batSettingForm() {
|
||||||
|
this.getList()
|
||||||
|
this.selectedRowKeys = []
|
||||||
},
|
},
|
||||||
addModelForm() {
|
addModelForm() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
edit(item) {
|
||||||
|
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
|
||||||
|
},
|
||||||
|
deleteLib(val) {
|
||||||
|
let _this = this
|
||||||
|
this.$confirm({
|
||||||
|
content: _this.$t('ConfirmDelete'),
|
||||||
|
onOk() {
|
||||||
|
deleteAction(_this.url.deleteOne, { id: val.id, projectLibraryId: _this.$route.query.id }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
|
_this.getList()
|
||||||
|
} else {
|
||||||
|
_this.$message.warning(_this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
modifyHistoryClick() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user