对接握手流程
This commit is contained in:
@@ -716,4 +716,5 @@ module.exports = {
|
|||||||
result: 'result',
|
result: 'result',
|
||||||
opinion: 'opinion',
|
opinion: 'opinion',
|
||||||
operationNode: 'operation node',
|
operationNode: 'operation node',
|
||||||
|
taskDataConfirmation: 'Please select the data whose list confirmation status is accepted and task confirmation status is not initiated or rejected, and the regulatory engineer and certification engineer are not empty'
|
||||||
}
|
}
|
||||||
@@ -669,6 +669,7 @@ module.exports = {
|
|||||||
listConfirmationStatus:'清单确认状态',
|
listConfirmationStatus:'清单确认状态',
|
||||||
ListConfirmationDeadline:'清单确认截止时间',
|
ListConfirmationDeadline:'清单确认截止时间',
|
||||||
dataConfirmation:'请选择清单确认状态为未发起或拒绝的数据,以及法规工程师、认证工程师不为空',
|
dataConfirmation:'请选择清单确认状态为未发起或拒绝的数据,以及法规工程师、认证工程师不为空',
|
||||||
|
taskDataConfirmation:'请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据,以及法规工程师、认证工程师不为空',
|
||||||
pleaseSelectPersonFirst:'请先选择人员',
|
pleaseSelectPersonFirst:'请先选择人员',
|
||||||
onlyOnePersonCanBeSelected:'只能选择一个人员',
|
onlyOnePersonCanBeSelected:'只能选择一个人员',
|
||||||
overrule:'驳回',
|
overrule:'驳回',
|
||||||
|
|||||||
@@ -46,11 +46,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<div style="float: left;margin-bottom: 19px;margin-left: 20px" v-if="isDisplay">
|
<div style="float: left;margin-bottom: 19px;margin-left: 20px" v-if="isDisplay">
|
||||||
<div class="operator-text" @click="initiateListConfirmationcClick">
|
<div class="operator-text" @click="initiateListConfirmationcClick('清单')">
|
||||||
<a-icon type="solution"/>
|
<a-icon type="solution"/>
|
||||||
{{ $t('initiateListConfirmation') }}
|
{{ $t('initiateListConfirmation') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text">
|
<div class="operator-text" @click="initiateTaskConfirmationClick('任务')">
|
||||||
<a-icon type="file-protect"/>
|
<a-icon type="file-protect"/>
|
||||||
{{ $t('initiateTaskConfirmation') }}
|
{{ $t('initiateTaskConfirmation') }}
|
||||||
</div>
|
</div>
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
<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="inventoryAffirmDueDate">
|
<a-form-model-item v-if="this.timeName == '清单'" 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:'inventoryAffirmDueDate'})"
|
@change="dateChange({db_field_name:'inventoryAffirmDueDate'})"
|
||||||
@@ -210,6 +210,14 @@
|
|||||||
v-model="formInline.inventoryAffirmDueDate"
|
v-model="formInline.inventoryAffirmDueDate"
|
||||||
style="width: 100%"/>
|
style="width: 100%"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
|
<a-form-model-item v-else-if="this.timeName == '任务'" class="itemModel" prop="taskAffirmDueDate">
|
||||||
|
<a-date-picker class="box-input"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('TaskCutOffTime')"
|
||||||
|
@change="dateChange({db_field_name:'taskAffirmDueDate'})"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
v-model="formInline.taskAffirmDueDate"
|
||||||
|
style="width: 100%"/>
|
||||||
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -485,6 +493,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
visibleFile: false,
|
visibleFile: false,
|
||||||
|
timeName: '',
|
||||||
dataSourceFile: [],
|
dataSourceFile: [],
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
queryParamQuery: {},
|
queryParamQuery: {},
|
||||||
@@ -499,6 +508,13 @@
|
|||||||
message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'),
|
message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
taskAffirmDueDate: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('TaskCutOffTime') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
@@ -711,22 +727,57 @@
|
|||||||
getPersonnelList() {
|
getPersonnelList() {
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
initiateListConfirmationcClick() {
|
initiateListConfirmationcClick(name) {
|
||||||
|
this.timeName = name
|
||||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||||
this.dataSource.forEach(res => {
|
let isTrue = true
|
||||||
selectedRowKeys.forEach(val => {
|
for (let i = 0; i < this.dataSource.length; i++) {
|
||||||
if (res.id == val) {
|
for (let j = 0; j < selectedRowKeys.length; j++) {
|
||||||
if ((res.inventoryAffirmStatus == 'Not started' || res.inventoryAffirmStatus == 'rejected') &&
|
if (this.dataSource[i].id == selectedRowKeys[j]) {
|
||||||
res.homologationEngineerId && res.regulationOwnerId) {
|
if ((this.dataSource.inventoryAffirmStatus == 'Not started' || this.dataSource.inventoryAffirmStatus == 'rejected') &&
|
||||||
this.visible = true
|
this.dataSource.homologationEngineerId && this.dataSource.regulationOwnerId) {
|
||||||
this.formInline = {}
|
isTrue = true
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('dataConfirmation'))
|
this.$message.warning(this.$t('dataConfirmation'))
|
||||||
|
isTrue = false
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
})
|
}
|
||||||
|
if (isTrue) {
|
||||||
|
this.visible = true
|
||||||
|
this.formInline = {}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initiateTaskConfirmationClick(name) {
|
||||||
|
this.timeName = name
|
||||||
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
|
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||||
|
let isTrue = true
|
||||||
|
for (let i = 0; i < this.dataSource.length; i++) {
|
||||||
|
for (let j = 0; j < selectedRowKeys.length; j++) {
|
||||||
|
if (this.dataSource[i].id == selectedRowKeys[j]) {
|
||||||
|
if ((this.dataSource[i].taskAffirmStatus == 'Not started' || this.dataSource[i].taskAffirmStatus == 'rejected') &&
|
||||||
|
this.dataSource[i].homologationEngineerId && this.dataSource[i].regulationOwnerId
|
||||||
|
&& this.dataSource[i].inventoryAffirmStatus == 'accepted') {
|
||||||
|
isTrue = true
|
||||||
|
} else {
|
||||||
|
isTrue = false
|
||||||
|
this.$message.warning(this.$t('taskDataConfirmation'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isTrue) {
|
||||||
|
this.visible = true
|
||||||
|
this.formInline = {}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}
|
}
|
||||||
@@ -735,6 +786,7 @@
|
|||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||||
|
if (this.timeName == '清单') {
|
||||||
let query = {
|
let query = {
|
||||||
operatorType: 0,
|
operatorType: 0,
|
||||||
ids: selectedRowKeys.join(','),
|
ids: selectedRowKeys.join(','),
|
||||||
@@ -754,6 +806,48 @@
|
|||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < this.dataSource.length; i++) {
|
||||||
|
for (let j = 0; j < selectedRowKeys.length; j++) {
|
||||||
|
if (this.dataSource[i].id == selectedRowKeys[j]) {
|
||||||
|
this.dataSource[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
|
||||||
|
Object.keys(this.dataSource[i]).forEach(res => {
|
||||||
|
if (this.dataSource[i][res] && this.dataSource[i][res] instanceof String) {
|
||||||
|
this.dataSource[i][res] = this.dataSource[i][res].replace(/\"/g, '“')
|
||||||
|
this.dataSource[i][res] = this.dataSource[i][res].replace(/\'/g, '‘')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let data = JSON.stringify(this.dataSource[i]).replace(/\"/g, '\'')
|
||||||
|
setTimeout(() => {
|
||||||
|
this.startProcess(data)
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
startProcess(value) {
|
||||||
|
let query = {
|
||||||
|
type: 1,
|
||||||
|
msg: JSON.stringify(value)
|
||||||
|
}
|
||||||
|
postAction('/workFlow/startProcess', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.completeTask(value, res.result)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
completeTask(value, taskId) {
|
||||||
|
let query = {
|
||||||
|
userid: this.userInfo().id,
|
||||||
|
taskId: taskId,
|
||||||
|
json: value
|
||||||
|
}
|
||||||
|
postAction('/workFlow/completeTask', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -766,20 +860,20 @@
|
|||||||
if (this.dataSource[i].roleCode == 1 && this.dataSource[i].regulationOwnerSubmitStatus) {
|
if (this.dataSource[i].roleCode == 1 && this.dataSource[i].regulationOwnerSubmitStatus) {
|
||||||
isTrue = false
|
isTrue = false
|
||||||
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
||||||
break
|
return
|
||||||
} else if (this.dataSource[i].roleCode == 2 && this.dataSource[i].homologationEngineerSubmitStatus) {
|
} else if (this.dataSource[i].roleCode == 2 && this.dataSource[i].homologationEngineerSubmitStatus) {
|
||||||
isTrue = false
|
isTrue = false
|
||||||
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
||||||
break
|
return
|
||||||
} else if (this.dataSource[i].roleCode == 4 && (this.dataSource[i].homologationEngineerSubmitStatus && this.dataSource[i].regulationOwnerSubmitStatus)) {
|
} else if (this.dataSource[i].roleCode == 4 && (this.dataSource[i].homologationEngineerSubmitStatus && this.dataSource[i].regulationOwnerSubmitStatus)) {
|
||||||
isTrue = false
|
isTrue = false
|
||||||
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
||||||
break
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
isTrue = false
|
isTrue = false
|
||||||
this.$message.warning(this.$t('The') + (i + 1) + this.$t('incorrectsubmitted'))
|
this.$message.warning(this.$t('The') + (i + 1) + this.$t('incorrectsubmitted'))
|
||||||
break
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user