Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
wangzhijiang
2023-03-14 11:01:31 +08:00
3 changed files with 115 additions and 65 deletions
+2
View File
@@ -1432,4 +1432,6 @@ module.exports = {
onlyDataSelected:'Only data with process status of task to be confirmed, result to be submitted and review to be returned can be selected', onlyDataSelected:'Only data with process status of task to be confirmed, result to be submitted and review to be returned can be selected',
youCannotStatusListToBeReleasedAndApproved:'You cannot select data whose process status is list to be released and approved', youCannotStatusListToBeReleasedAndApproved:'You cannot select data whose process status is list to be released and approved',
batchmodify:'Whether to batch modify', batchmodify:'Whether to batch modify',
onlyDataListReleasedAndCertificationReturnCanSelected:'Only data with the process status of list to be released and certification return can be selected'
} }
+1
View File
@@ -1534,4 +1534,5 @@ module.exports = {
onlyDataSelected:'只能选择流程状态为任务待确认结果待提交审查退回的数据', onlyDataSelected:'只能选择流程状态为任务待确认结果待提交审查退回的数据',
youCannotStatusListToBeReleasedAndApproved:'不能选择流程状态为清单待发布审查通过的数据', youCannotStatusListToBeReleasedAndApproved:'不能选择流程状态为清单待发布审查通过的数据',
batchmodify:'是否批量修改', batchmodify:'是否批量修改',
onlyDataListReleasedAndCertificationReturnCanSelected:'只能选择流程状态为清单待发布和认证退回的数据'
} }
@@ -355,41 +355,41 @@
<referenceDeliverablesList ref="referenceDeliverablesListRef" @referenceDeliverablesListForm="transferListForm"/> <referenceDeliverablesList ref="referenceDeliverablesListRef" @referenceDeliverablesListForm="transferListForm"/>
<SelectedBy ref="SelectedByRef" :title="$t('turnToDo')" @SelectedByForm="SelectedByForm"></SelectedBy> <SelectedBy ref="SelectedByRef" :title="$t('turnToDo')" @SelectedByForm="SelectedByForm"></SelectedBy>
<viewFileModel ref="viewFileModelRef"/> <viewFileModel ref="viewFileModelRef"/>
<a-modal <!-- <a-modal-->
:title="listTitle" <!-- :title="listTitle"-->
:width="500" <!-- :width="500"-->
:visible="visible" <!-- :visible="visible"-->
:confirm-loading="confirmLoading" <!-- :confirm-loading="confirmLoading"-->
:maskClosable="false" <!-- :maskClosable="false"-->
@ok="handleOk" <!-- @ok="handleOk"-->
@cancel="handleCancel" <!-- @cancel="handleCancel"-->
> <!-- >-->
<a-spin :spinning="confirmLoading"> <!-- <a-spin :spinning="confirmLoading">-->
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm"> <!-- <a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">-->
<a-row :gutter="24"> <!-- <a-row :gutter="24">-->
<a-col :span="24"> <!-- <a-col :span="24">-->
<div class="box-title-text-index"> <!-- <div class="box-title-text-index">-->
<div class="title-text-index"> <!-- <div class="title-text-index">-->
<span class="Required">*</span> <!-- <span class="Required">*</span>-->
<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" prop="endTime"> <!-- <a-form-model-item class="itemModel" prop="endTime">-->
<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:'endTime'})" <!-- @change="dateChange({db_field_name:'endTime'})"-->
format="YYYY-MM-DD" <!-- format="YYYY-MM-DD"-->
:disabledDate="disabledDate" <!-- :disabledDate="disabledDate"-->
:getCalendarContainer="(trigger) => trigger.parentNode" <!-- :getCalendarContainer="(trigger) => trigger.parentNode"-->
v-model="formInline.endTime" <!-- v-model="formInline.endTime"-->
style="width: 100%"/> <!-- style="width: 100%"/>-->
</a-form-model-item> <!-- </a-form-model-item>-->
</div> <!-- </div>-->
</a-col> <!-- </a-col>-->
</a-row> <!-- </a-row>-->
</a-form-model> <!-- </a-form-model>-->
</a-spin> <!-- </a-spin>-->
</a-modal> <!-- </a-modal>-->
<a-modal <a-modal
:title="$t('roleSwitching')" :title="$t('roleSwitching')"
:width="500" :width="500"
@@ -940,46 +940,93 @@
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') : ''
}, },
releaseClick() { releaseClick() {
this.listTitle = this.$t('Deadline') // this.listTitle = this.$t('Deadline')
if (this.selectedRowKeysList.length < 1) { // if (this.selectedRowKeysList.length < 1) {
this.$message.warning(this.$t('selectLeastOne')) // this.$message.warning(this.$t('selectLeastOne'))
// } else {
// this.visible = true
// }
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let ids = []
let notConditions = []
for (let i = 0; i < this.selectedRowKeysList.length; i++) {
if (this.selectedRowKeysList[i].flowStatus == 'List to be released' ||
this.selectedRowKeysList[i].flowStatus == 'Certification returned') {
ids.push(this.selectedRowKeysList[i].id)
} else {
notConditions.push(this.selectedRowKeysList[i].inspectionItem)
}
}
let data = ''
if (notConditions && notConditions.length > 0) {
data = this.$t('inspectionItems') + '"' + notConditions.join('、') + '"' + this.$t('conditionsNotMet') + ',' + this.$t('onlyDataListReleasedAndCertificationReturnCanSelected')
}
if (ids && ids.length > 0) {
this.releaseData(ids, notConditions, data)
} else {
this.failedMessage(data)
}
} else { } else {
this.visible = true this.$message.warning(this.$t('selectLeastOne'))
} }
}, },
handleOk() { releaseData(ids, notConditions, data){
this.$refs.ruleForm.validate(valid => { let _this = this
if (valid) { this.$confirm({
let selectedRowKeys = [] content: _this.$t('confirmRelease'),
this.selectedRowKeysList.forEach(res => { onOk() {
selectedRowKeys.push(res.id) postAction('/project/projectCertificationInventoryEO/issue', {
}) ids: ids.join(','),
let query = { projectLibraryId: _this.$route.query.id,
ids: selectedRowKeys.join(','), }).then((res) => {
projectLibraryId: this.$route.query.id,
...this.formInline
}
this.confirmLoading = true
postAction('/project/projectCertificationInventoryEO/issue', query).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))
this.visible = false _this.selectedRowKeys = []
this.selectedRowKeys = [] _this.selectedRowKeysList = []
this.confirmLoading = false _this.getList()
this.getList() if (notConditions && notConditions.length > 0) {
_this.failedMessage(data)
}
} else { } else {
this.$message.warning(res.message) _this.$message.warning(res.message)
this.confirmLoading = false
} }
this.detailedSuccessList = []
}) })
} }
}) })
}, },
handleCancel() { // handleOk() {
this.formInline = {} // this.$refs.ruleForm.validate(valid => {
this.visible = false // if (valid) {
}, // let selectedRowKeys = []
// this.selectedRowKeysList.forEach(res => {
// selectedRowKeys.push(res.id)
// })
// let query = {
// ids: selectedRowKeys.join(','),
// projectLibraryId: this.$route.query.id,
// ...this.formInline
// }
// this.confirmLoading = true
// postAction('/project/projectCertificationInventoryEO/issue', query).then((res) => {
// if (res.success) {
// this.$message.success(this.$t('OperationSuccessful'))
// this.visible = false
// this.selectedRowKeys = []
// this.confirmLoading = false
// this.getList()
// } else {
// this.$message.warning(res.message)
// this.confirmLoading = false
// }
// this.detailedSuccessList = []
// })
// }
// })
// },
// handleCancel() {
// this.formInline = {}
// this.visible = false
// },
//撤回 //撤回
withdrawClick() { withdrawClick() {