+
@@ -2076,19 +2076,6 @@
this.detailedSuccessList = []
this.detailedWarningList = []
})
- } else {
- let TaskSuccessList = JSON.parse(JSON.stringify(this.TaskSuccessList))
- for (let i = 0; i < TaskSuccessList.length; i++) {
- TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
- Object.keys(TaskSuccessList[i]).forEach(res => {
- if (TaskSuccessList[i][res] && TaskSuccessList[i][res] instanceof String) {
- TaskSuccessList[i][res] = TaskSuccessList[i][res].replace(/\"/g, '“')
- TaskSuccessList[i][res] = TaskSuccessList[i][res].replace(/\'/g, '‘')
- }
- })
- }
- this.confirmLoading = true
- this.startProcess(TaskSuccessList)
}
}
})
@@ -2100,8 +2087,7 @@
projectLawsInvnetoryList: value,
projectNameId: this.$route.query.projectNameId,
projectName: this.$route.query.projectName,
- projectLawsInventoryId: value.id,
- taskAffirmDueDate: this.formInline.taskAffirmDueDate
+ projectLawsInventoryId: value.id
}
postAction('/workFlow/startProcess', query).then((res) => {
if (res.success) {
@@ -2109,18 +2095,7 @@
this.selectedRowKeys = []
this.$message.success(this.$t('OperationSuccessful'))
this.confirmLoading = false
- this.getList()
- let that = this
- if (this.TaskWarningList.length > 0) {
- this.$warning({
- content: (
- < div >
- { that.TaskWarningList }
- < /div>
- )
- })
- }
- // this.completeTask(value, res.result, index)
+ this.completeTask(value, res.result)
} else {
this.$message.warning(this.$t('operationFailed'))
}
@@ -2166,122 +2141,7 @@
})
},
- getRowKeys(value, num, callBack) {
- let isTrue = true
- let dataSource = []
- for (let i = 0; i < this.dataSource.length; i++) {
- for (let j = 0; j < value.length; j++) {
- if (this.dataSource[i].id == value[j]) {
- dataSource.push(this.dataSource[i])
- }
- }
- }
- this.rowKeysSuccessList = []
- this.rowKeysWarningList = []
- for (let i = 0; i < dataSource.length; i++) {
- if (dataSource[i].inventoryAffirmStatus == 'List to confirm' || dataSource[i].inventoryAffirmStatus == 'Rejected') {
- if (dataSource[i].roleCode == 1 && dataSource[i].regulationOwnerSubmitStatus) {
-
- this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>)
- continue
- } else if (dataSource[i].roleCode == 2 && dataSource[i].homologationEngineerSubmitStatus) {
-
- this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>)
- continue
- } else if (dataSource[i].roleCode == 4 && (dataSource[i].homologationEngineerSubmitStatus && dataSource[i].regulationOwnerSubmitStatus)) {
-
- this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('submitted') } < /div>)
- continue
- }
- if (num == 1) {
- if ((dataSource[i].designInitiatorId == dataSource[i].regulationOwnerId
- && dataSource[i].designInitiatorId == this.userInfo().id) ||
- (dataSource[i].designInitiatorId == dataSource[i].homologationEngineerId
- && dataSource[i].designInitiatorId == this.userInfo().id)) {
- if (!dataSource[i].designDutyId && !dataSource[i].designDueDate) {
- this.rowKeysWarningList.push(
- < div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>)
- continue
- } else if (!dataSource[i].designDutyId) {
- this.rowKeysWarningList.push(
- < div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theResponsiblePersonEmpty') } < /div>)
- continue
- } else if (!dataSource[i].designDueDate) {
- this.rowKeysWarningList.push(
- < div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theDeadlineEmpty') } < /div>)
- continue
- } else if (!dataSource[i].designDeliverableType) {
- this.rowKeysWarningList.push(
- < div > { dataSource[i].serialNumber + this.$t('confirmationOfDesignConformity') + this.$t('theDeliveryTypeCannotBeEmpty') } < /div>)
- continue
- }
- }
- if ((dataSource[i].prehomoInitiatorId == dataSource[i].regulationOwnerId
- && dataSource[i].prehomoInitiatorId == this.userInfo().id) ||
- (dataSource[i].prehomoInitiatorId == dataSource[i].homologationEngineerId
- && dataSource[i].prehomoInitiatorId == this.userInfo().id)) {
- if (!dataSource[i].prehomoDutyId && !dataSource[i].prehomoDueDate) {
- this.rowKeysWarningList.push(
- < div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>)
- continue
- } else if (!dataSource[i].prehomoDutyId) {
- this.rowKeysWarningList.push(
- < div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theResponsiblePersonEmpty') } < /div>)
- continue
- } else if (!dataSource[i].prehomoDueDate) {
- this.rowKeysWarningList.push(
- < div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theDeadlineEmpty') } < /div>)
- continue
- } else if (!dataSource[i].prehomoDeliverableType) {
- this.rowKeysWarningList.push(
- < div > { dataSource[i].serialNumber + this.$t('PrehomoConfirmation') + this.$t('theDeliveryTypeCannotBeEmpty') } < /div>)
- continue
- }
- }
- if ((dataSource[i].verifyInitiatorId == dataSource[i].regulationOwnerId
- && dataSource[i].verifyInitiatorId == this.userInfo().id) ||
- (dataSource[i].verifyInitiatorId == dataSource[i].homologationEngineerId
- && dataSource[i].verifyInitiatorId == this.userInfo().id)) {
- if (!dataSource[i].verifyDutyId && !dataSource[i].verifyDueDate) {
- this.rowKeysWarningList.push(
- < div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theResponsiblePersonAndDeadlineClank') } < /div>)
- continue
- } else if (!dataSource[i].verifyDutyId) {
- this.rowKeysWarningList.push(
- < div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theResponsiblePersonEmpty') } < /div>)
- continue
- } else if (!dataSource[i].verifyDueDate) {
- this.rowKeysWarningList.push(
- < div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theDeadlineEmpty') } < /div>)
- continue
- } else if (!dataSource[i].verifyDeliverableType) {
- this.rowKeysWarningList.push(
- < div > { dataSource[i].serialNumber + this.$t('verificationAndConformityconfirmation') + this.$t('theDeliveryTypeCannotBeEmpty') } < /div>)
- continue
- }
- }
- }
- this.rowKeysSuccessList.push(dataSource[i])
- } else {
- this.rowKeysWarningList.push( < div > { dataSource[i].serialNumber + this.$t('incorrectsubmitted') } < /div>)
- }
- }
-
- if (this.rowKeysSuccessList && this.rowKeysSuccessList.length > 0) {
- callBack && callBack()
- } else {
- let that = this
- this.$warning({
- content: (
- < div >
- { that.rowKeysWarningList }
- < /div>
- )
- })
- }
- },
-
- sendBackClick() {
+ submitOrSendBackClick(num) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.detailedWarningList = []
let dataSource = []
@@ -2305,11 +2165,15 @@
}
}
if (idList && idList.length > 0) {
- this.visibleComment = true
- this.formInlineComment = {}
- this.$nextTick(() => {
- this.$refs.ruleFormComment.clearValidate()
- })
+ if (num == 0) {
+ this.submitClick(this.rowKeysSuccessList, 1)
+ } else {
+ this.visibleComment = true
+ this.formInlineComment = {}
+ this.$nextTick(() => {
+ this.$refs.ruleFormComment.clearValidate()
+ })
+ }
} else {
this.promptInformation(this.detailedWarningList)
}
@@ -2317,6 +2181,94 @@
this.$message.warning(this.$t('selectLeastOne'))
}
},
+ submitClick(dataList, num) {
+ let content = []
+ let designList = []
+ let verifyList = []
+ let detailedWarningList = []
+ this.detailedWarningList = []
+ let _this = this
+ _this.$destroyAll()
+ if (num == 1) {
+ for (let i = 0; i < dataList.length; i++) {
+ if (!dataList[i].designDeliverableType && !dataList[i].designDutyId && !dataList[i].designDueDate) {
+ content.push(dataList[i])
+ continue
+ }
+ if (!dataList[i].verifyDeliverableType && !dataList[i].verifyDutyId && !dataList[i].verifyDueDate) {
+ content.push(dataList[i])
+ continue
+ }
+ }
+ }
+ if (content && content.length > 0) {
+ for (let i = 0; i < content.length; i++) {
+ if (!content[i].designDeliverableType) {
+ designList.push(content[i].serialNumber)
+ }
+ if (!content[i].verifyDeliverableType) {
+ verifyList.push(content[i].serialNumber)
+ }
+ }
+ if (designList.length > 0 || verifyList.length > 0) {
+ detailedWarningList.push(
+ < div > { this.$t('theDataYouSelectedContainsSkip') } < /div>)
+ }
+ if (designList.length > 0) {
+ detailedWarningList.push(
+ < div > { designList.join(',') + ' ' + this.$t('designComplianceProcessFor') } < /div>)
+ }
+ if (verifyList.length > 0) {
+ detailedWarningList.push(
+ < div > { verifyList.join(',') + ' ' + this.$t('validationComplianceProcessFor') } < /div>)
+ }
+ this.$confirm({
+ content: detailedWarningList,
+ class: 'confirmClass',
+ onOk() {
+ _this.submitClick(dataList, 2)
+ }
+ })
+ return
+ }
+ this.$confirm({
+ content: _this.$t('confirmLaunchTask'),
+ onOk() {
+ _this.submitAdmin(dataList)
+ }
+ })
+ },
+ submitAdmin(dataList) {
+ let _this = this
+ for (let i = 0; i < dataList.length; i++) {
+ if (dataList[i].designDeliverableType) {
+ if (!dataList[i].designDutyId) {
+ _this.detailedWarningList.push(
+ < div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForDesignCannotBeBlank') } < /div>)
+ }
+ if (!dataList[i].designDueDate) {
+ _this.detailedWarningList.push(
+ < div > { dataList[i].serialNumber + _this.$t('theDeadlineForTheDesignCannotBeEmpty') } < /div>)
+ }
+ }
+ if (dataList[i].verifyDeliverableType) {
+ if (!dataList[i].verifyDueDate) {
+ _this.detailedWarningList.push(
+ < div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForVerifyingEmpty') } < /div>)
+ }
+ if (!dataList[i].verifyDutyId) {
+ _this.detailedWarningList.push(
+ < div > { dataList[i].serialNumber + _this.$t('thePersonResponsibleForVerifyingEmpty') } < /div>)
+ }
+ }
+ if (dataList[i].designDeliverableType && dataList[i].designDutyId && dataList[i].designDueDate) {
+ _this.startProcess(dataList[i], 2)
+ }
+ if (dataList[i].verifyDeliverableType && dataList[i].verifyDutyId && dataList[i].verifyDueDate) {
+ _this.startProcess(dataList[i], 2)
+ }
+ }
+ },
handleOkComment() {
this.$refs.ruleFormComment.validate(valid => {
if (valid) {
@@ -2895,5 +2847,13 @@
touch-action: none;
}
+ .confirmClass .ant-modal-confirm-body {
+ display: flex;
+ }
+
+ .confirmClass .ant-modal-confirm-body .ant-modal-confirm-content {
+ margin-top: 0 !important;
+ }
+
/* 插件 end */
\ No newline at end of file