Commit f515e529 authored by jingnan's avatar jingnan 👀

试验申请维护修改

parent 3d7935a3
......@@ -533,6 +533,40 @@
<!-- 物料确认 -->
<RecordMaintenance ref="RecordMaintenance" @refreshPage="refreshPage" />
<!-- 物料确认 -->
<!-- 试验申请创建 -->
<el-drawer
title="试验申请"
size="50%"
append-to-body
:before-close="onClose"
:visible.sync="drawerShowExperimentAdd"
>
<dee-as-com
:lay-config="{
typeName: 'ExperimentRecord',
layKey: 'NotGeneral_Experiment_Create'
}"
:form="experimentApplyForm"
parent-show-mode="dialog"
@on-cancel="onClose"
/>
</el-drawer>
<!-- 检验员 -->
<dee-dialog
width="30%"
title="选择检验员"
:dialog-visible="showDialog"
@handleClose="closeDialog"
>
<dee-as-com
:lay-config="{
typeName: 'ExperimentRecord',
layKey: 'checker'
}"
:form="checkerForm"
@on-cancel="closeDialog"
/>
</dee-dialog>
</div>
</template>
......@@ -598,7 +632,12 @@ export default {
showHeader: true,
sideShow: true,
isOK: !this.$route.query.isOK || this.$route.query.isOK === 'false',
isRevoke: this.$route.query.isRevoke && this.$route.query.isRevoke === 'true'
isRevoke: this.$route.query.isRevoke && this.$route.query.isRevoke === 'true',
drawerShowExperimentAdd: false,
experimentApplyForm: {},
showDialog: false,
checkerForm: {},
experimentProcessInfo: {}
}
},
computed: {},
......@@ -607,6 +646,7 @@ export default {
handler(to, from) {
if (to && to.name === 'assemblyPerform') {
this.getWorkingProcedure()
this.refreshPage()
}
}
// immediate: true
......@@ -645,6 +685,24 @@ export default {
}
})
})
this.$bus.$on('completeExperimentAdd', ({ items }) => {
this.$nextTick(() => {
this.drawerShowExperimentAdd = false
if (items.id) {
this.getProcessInfo(items.id)
}
})
})
this.$bus.$on('refreshAssemblyPerform', () => {
this.$nextTick(() => {
this.showDialog = false
this.refreshPage()
})
})
},
beforeDestroy() {
this.$bus.$off('completeExperimentAdd')
this.$bus.$off('refreshAssemblyPerform')
},
methods: {
getQRcode(info) {
......@@ -1247,21 +1305,36 @@ export default {
if (this.editor.countRecord) {
this.$refs.RecordMaintenance.open()
} else {
var that = this
this.$confirm('确定要试验申请吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
if (!this.headerData) return
this.drawerShowExperimentAdd = true
this.$set(this.experimentApplyForm, 'isGeneral', false)
this.$set(this.experimentApplyForm, 'aircraftType', this.headerData.resName)
this.$set(this.experimentApplyForm, 'sorties', this.headerData.serialNo)
this.$set(this.experimentApplyForm, 'extProcessPlan', {
serialNumber: this.headerData.serialNumber,
name: this.headerData.name,
id: this.headerData.aoId
})
.then(() => {
that.testApplication()
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
this.$set(this.experimentApplyForm, 'extProcessOperation', {
serialNumber: this.editor.serialNumber,
name: this.editor.title,
id: this.editor.tableId
})
// var that = this
// this.$confirm('确定要试验申请吗11', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(() => {
// that.testApplication()
// })
// .catch(() => {
// this.$message({
// type: 'info',
// message: '已取消'
// })
// })
}
},
getHandledValue(num) {
......@@ -1410,7 +1483,48 @@ export default {
},
refreshPage() {
this.getWorkingProcedure()
},
getProcessInfo(id) {
post(
`/workflow/task/?page=1&size=9999`,
{
'pbo': `com.yonde.tf.mom.common.vo.execute.ExperimentRecordVO_dex_wfc_${id}`
}
)
.then((res) => {
if (res && res.items && res.items.content) {
const info = res.items.content[0] || {}
this.showDialog = true
this.checkerForm = {
'operationName': 'completeTask',
'operator': localStorage.getItem('userId'),
'description': '',
'id': info.id,
'processDefinitionId': info.processDefinitionId,
'processInstId': info.processInstanceId,
'routerSelect': 'check',
'taskDefinitionKey': info.taskDefinitionKey,
'participants': {
'wf_act_TeamRole_checker_userList': [
]
},
'variables': {},
'taskVariables': {}
}
}
})
.catch((err) => console.error(err))
.finally(() => {
// that.editShow = false
})
},
onClose() {
this.drawerShowExperimentAdd = false
},
closeDialog() {
this.showDialog = false
}
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment