对接文档详情的法规清单

This commit is contained in:
qq787203167
2022-04-18 14:53:21 +08:00
parent b945873bf7
commit 2facbce5c7
5 changed files with 78 additions and 21 deletions
+1
View File
@@ -664,4 +664,5 @@ module.exports = {
taskAffirmStatus: 'task Affirm Status', taskAffirmStatus: 'task Affirm Status',
listConfirmationStatus:'List confirmation status', listConfirmationStatus:'List confirmation status',
ListConfirmationDeadline:'List confirmation deadline', ListConfirmationDeadline:'List confirmation deadline',
dataConfirmation:'Please select the data whose list confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty',
} }
+1
View File
@@ -668,4 +668,5 @@ module.exports = {
taskAffirmStatus:'任务确认状态', taskAffirmStatus:'任务确认状态',
listConfirmationStatus:'清单确认状态', listConfirmationStatus:'清单确认状态',
ListConfirmationDeadline:'清单确认截止时间', ListConfirmationDeadline:'清单确认截止时间',
dataConfirmation:'请选择清单确认状态为未发起或拒绝的数据,以及法规工程师认证工程师不为空',
} }
@@ -16,13 +16,17 @@
<div class="title-text"> <div class="title-text">
<span class="title-text-text" :title="$t('entryName')">{{$t('entryName')}}</span> <span class="title-text-text" :title="$t('entryName')">{{$t('entryName')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="entryName"> <a-form-model-item class="itemModel" prop="projectName">
<j-dict-select-tag class="box-input" v-model="formInline.projectName" <a-select :placeholder="$t('PleaseSelect')+$t('entryName')"
:disabled="disabled" v-model="formInline.projectName">
@input="handleInput('projectName')" <a-select-option v-for="(item, key) in projectNameList"
:placeholder="$t('PleaseSelect')+$t('entryName')" :key="key"
:type="'select'" :value="item.id">
:triggerChange="false" :dictCode="'dict_field'"/> <span style="display: inline-block;width: 100%" :title=" item.projectName ">
{{ item.projectName}}
</span>
</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -189,12 +193,23 @@
visible: false, visible: false,
rules: {}, rules: {},
disabled: false, disabled: false,
projectNameList: [],
title: '' title: ''
} }
}, },
mounted() { mounted() {
this.getNameList()
}, },
methods: { methods: {
getNameList() {
getAction('project/projectNameInfoEO/list', {}).then((res) => {
if (res.success) {
this.projectNameList = res.result || []
} else {
this.projectNameList = []
}
})
},
addModel() { addModel() {
this.visible = true this.visible = true
this.title = '新增' this.title = '新增'
@@ -222,8 +237,14 @@
url = this.url.add url = this.url.add
Action = postAction Action = postAction
} }
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, this.formInline).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'))
@@ -188,10 +188,10 @@
<div class="title-text"> <div class="title-text">
<span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span> <span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="'regulatoryEngineer'"> <a-form-model-item class="itemModel" :prop="'regulationOwnerId'">
<a-select :placeholder="$t('PleaseSelect')+$t('regulatoryEngineer')" <a-select :placeholder="$t('PleaseSelect')+$t('regulatoryEngineer')"
v-model="formInline.regulatoryEngineer"> v-model="formInline.regulationOwnerId">
<a-select-option v-for="(item, key) in regulatoryEngineerList" <a-select-option v-for="(item, key) in regulatoryEngineerList"
:key="key" :key="key"
:value="item.value"> :value="item.value">
@@ -210,9 +210,9 @@
<div class="title-text"> <div class="title-text">
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span> <span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
</div> </div>
<a-form-model-item class="itemModel" :prop="'certifiedEngineer'"> <a-form-model-item class="itemModel" :prop="'homologationEngineerId'">
<a-select :placeholder="$t('PleaseSelect')+$t('certifiedEngineer')" <a-select :placeholder="$t('PleaseSelect')+$t('certifiedEngineer')"
v-model="formInline.certifiedEngineer"> v-model="formInline.homologationEngineerId">
<a-select-option v-for="(item, key) in regulatoryEngineerList" <a-select-option v-for="(item, key) in regulatoryEngineerList"
:key="key" :key="key"
:value="item.value"> :value="item.value">
@@ -127,12 +127,12 @@
<span class="title-text-text" <span class="title-text-text"
:title="$t('TaskCutOffTime')">{{$t('TaskCutOffTime')}}</span> :title="$t('TaskCutOffTime')">{{$t('TaskCutOffTime')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel" prop="inventoryAffirmDueDate">
<a-date-picker class="box-input" <a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')" :placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
@change="dateChange({db_field_name:'TaskCutOffTime'})" @change="dateChange({db_field_name:'inventoryAffirmDueDate'})"
format="YYYY-MM-DD" format="YYYY-MM-DD"
v-model="formInline.TaskCutOffTime" v-model="formInline.inventoryAffirmDueDate"
style="width: 100%"/> style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -363,7 +363,15 @@
selectedRowKeys: [], selectedRowKeys: [],
visible: false, visible: false,
formInline: {}, formInline: {},
rules: {}, rules: {
inventoryAffirmDueDate: [
{
required: true,
message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
queryParam: {}, queryParam: {},
url: { url: {
addModelList: '/document/bussDocumentLibraryEO/queryPageInfoDummy', addModelList: '/document/bussDocumentLibraryEO/queryPageInfoDummy',
@@ -371,7 +379,8 @@
addModel: 'project/projectLawsInventoryEO/add', addModel: 'project/projectLawsInventoryEO/add',
editModel: '/project/projectLawsInventoryEO/edit', editModel: '/project/projectLawsInventoryEO/edit',
deleteBatch: '/project/projectLawsInventoryEO/deleteBatch', deleteBatch: '/project/projectLawsInventoryEO/deleteBatch',
deleteOne: '/project/projectLawsInventoryEO/delete' deleteOne: '/project/projectLawsInventoryEO/delete',
updateStatusBatch: '/project/projectLawsInventoryEO/updateStatusBatch'
}, },
loading: false, loading: false,
dataSource: [] dataSource: []
@@ -471,11 +480,12 @@
this.dataSource.forEach(res => { this.dataSource.forEach(res => {
selectedRowKeys.forEach(val => { selectedRowKeys.forEach(val => {
if (res.id == val) { if (res.id == val) {
if (res.inventoryAffirmStatus == 'Not started' || res.inventoryAffirmStatus == 'rejected') { if ((res.inventoryAffirmStatus == 'Not started' || res.inventoryAffirmStatus == 'rejected') &&
res.homologationEngineerId && res.regulationOwnerId) {
this.visible = true this.visible = true
this.formInline = {} this.formInline = {}
} else { } else {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('dataConfirmation'))
} }
} }
}) })
@@ -485,7 +495,29 @@
} }
}, },
handleOk() { handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
operatorType: 0,
ids: selectedRowKeys.join(','),
projectLibraryId: this.$route.query.id,
...this.formInline
}
this.confirmLoading = true
getAction(this.url.updateStatusBatch, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.getList()
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
}, },
handleCancel() { handleCancel() {
this.formInline = {} this.formInline = {}
@@ -493,7 +525,7 @@
}, },
dateChange(item) { 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') : '' this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
}, }
} }
} }
</script> </script>
@@ -608,10 +640,12 @@
height: 38px; height: 38px;
margin-top: 2px; margin-top: 2px;
} }
.Required { .Required {
color: red; color: red;
margin-right: 4px; margin-right: 4px;
} }
.box-button { .box-button {
height: 38px; height: 38px;
} }