Commit f515e529 authored by jingnan's avatar jingnan 👀

试验申请维护修改

parent 3d7935a3
...@@ -533,6 +533,40 @@ ...@@ -533,6 +533,40 @@
<!-- 物料确认 --> <!-- 物料确认 -->
<RecordMaintenance ref="RecordMaintenance" @refreshPage="refreshPage" /> <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> </div>
</template> </template>
...@@ -598,7 +632,12 @@ export default { ...@@ -598,7 +632,12 @@ export default {
showHeader: true, showHeader: true,
sideShow: true, sideShow: true,
isOK: !this.$route.query.isOK || this.$route.query.isOK === 'false', 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: {}, computed: {},
...@@ -607,6 +646,7 @@ export default { ...@@ -607,6 +646,7 @@ export default {
handler(to, from) { handler(to, from) {
if (to && to.name === 'assemblyPerform') { if (to && to.name === 'assemblyPerform') {
this.getWorkingProcedure() this.getWorkingProcedure()
this.refreshPage()
} }
} }
// immediate: true // immediate: true
...@@ -645,6 +685,24 @@ export default { ...@@ -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: { methods: {
getQRcode(info) { getQRcode(info) {
...@@ -1247,21 +1305,36 @@ export default { ...@@ -1247,21 +1305,36 @@ export default {
if (this.editor.countRecord) { if (this.editor.countRecord) {
this.$refs.RecordMaintenance.open() this.$refs.RecordMaintenance.open()
} else { } else {
var that = this if (!this.headerData) return
this.$confirm('确定要试验申请吗', '提示', { this.drawerShowExperimentAdd = true
confirmButtonText: '确定', this.$set(this.experimentApplyForm, 'isGeneral', false)
cancelButtonText: '取消', this.$set(this.experimentApplyForm, 'aircraftType', this.headerData.resName)
type: 'warning' 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(() => { this.$set(this.experimentApplyForm, 'extProcessOperation', {
that.testApplication() serialNumber: this.editor.serialNumber,
}) name: this.editor.title,
.catch(() => { id: this.editor.tableId
this.$message({ })
type: 'info', // var that = this
message: '已取消' // this.$confirm('确定要试验申请吗11', '提示', {
}) // confirmButtonText: '确定',
}) // cancelButtonText: '取消',
// type: 'warning'
// })
// .then(() => {
// that.testApplication()
// })
// .catch(() => {
// this.$message({
// type: 'info',
// message: '已取消'
// })
// })
} }
}, },
getHandledValue(num) { getHandledValue(num) {
...@@ -1410,7 +1483,48 @@ export default { ...@@ -1410,7 +1483,48 @@ export default {
}, },
refreshPage() { refreshPage() {
this.getWorkingProcedure() 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> </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