Compare commits

..

No commits in common. "47866bb68f2f15222d22ad6e9470be1556f9edd9" and "8672012b06a764cabdd2dae35abb771e8840d06e" have entirely different histories.

3 changed files with 50 additions and 101 deletions

View File

@ -288,6 +288,7 @@ export default {
remark: item.remark
}
})]
console.log(this.formData)
await auditTicketWares(this.formData)
this.dialogVisible = false
this.$modal.msgSuccess("审核成功")

View File

@ -1,25 +1,7 @@
<template>
<div class="app-container">
<el-dialog title="流程记录" :visible.sync="dialogVisible" width="60%" v-dialogDrag append-to-body>
<el-row :gutter="1">
<el-col :span="24">
<span class="notice">{{
projectList.length === 0
? (this.formData.recordType === 'kssg'
? "没有项目可以施工"
: (this.formData.recordType === 'sgz')
? "没有项目在施工中"
: (this.formData.recordType === 'sgwczj'
? "没有项目可以完成"
: ''
)
)
: ''
}}</span>
</el-col>
</el-row>
<el-form :model="formData" ref="formRef" :rules="formRules" :loading="formLoading" :inline="true"
label-width="15rem">
<el-form :model="formData" ref="formRef" :rules="formRules" :loading="formLoading" :inline="true" label-width="15rem">
<el-row :gutter="1">
<el-col :span="24">
<el-form-item v-if="formData.recordType !== 'zj'" label="维修项目" prop="item.id">
@ -32,8 +14,7 @@
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="描述" prop="remark">
<el-input style="width: 30rem" type="textarea" v-model="formData.remark"
:autosize="{ minRows: 4, maxRows: 8}"/>
<el-input style="width: 30rem" type="textarea" v-model="formData.remark" :autosize="{ minRows: 4, maxRows: 8}"/>
</el-form-item>
</el-col>
</el-row>
@ -47,22 +28,12 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-if="formData.recordType !== 'sgwczj' && projectList.length > 0" type="primary" @click="doUpdate(null)">
<el-button v-if="formData.recordType !== 'sgwczj'" type="primary" @click="doUpdate"> </el-button>
<el-button v-if="formData.recordType === 'sgwczj'" type="primary" @click="doUpdate">部分完成</el-button>
<el-button v-if="formData.recordType === 'sgwczj'" type="success" @click="doFinish">
{{isNext ? "整体完成并指派下一项目" : (isEndCheck ? "整体完成并移交总检" : "整体完成")}}
</el-button>
<el-button v-if="formData.recordType === 'sgwczj' && projectList.length !== 0" type="primary" @click="doUpdate(null)">
部分完成
</el-button>
<el-button v-if="formData.recordType === 'sgwczj' && projectList.length !== 0" type="primary" @click="doFinish">
完成并移交下一班组
</el-button>
<el-button v-if="formData.recordType === 'sgwczj' && !isNext && projectList.length !== 0" type="primary"
@click="doFinish">
{{ isEndCheck ? "完成并移交总检" : "完成工单" }}
</el-button>
<!-- <el-button v-if="formData.recordType === 'sgwczj'" type="success" @click="doFinish">-->
<!-- {{isNext ? "整体完成并指派下一项目" : (isEndCheck ? "整体完成并移交总检" : "整体完成")}}-->
<!-- </el-button>-->
<el-button @click="dialogVisible = false"> </el-button>
</div>
</el-dialog>
@ -129,7 +100,6 @@ export default {
async open(row){
this.init()
this.clickRow = row
//
this.isEndCheck = row.endCheck === '1'
this.formData.id = row.id
this.formData.recordType = row.clickType
@ -143,28 +113,21 @@ export default {
this.projectList = res.data
this.formData.ticketsWorkStatus = "02"
this.formData.item.itemStatus = "02"
// 010203
// 便
//
//
if (this.formData.recordType !== 'kssg') {
if (this.formData.recordType === 'kssg') {
this.projectList = this.projectList.filter(item => item.itemStatus === '01')
}else if (this.formData.recordType === 'sgz'){
this.projectList = this.projectList.filter(item => item.itemStatus === '02')
// 西
//
if (this.formData.recordType !== 'sgz') {
}else {
// >1
this.isNext = this.projectList.filter(item => item.itemStatus !== '03').length > 1
}
this.projectList = this.projectList.filter(item => item.itemStatus === '02')
}
}finally {
this.formLoading = false
}
},
async doUpdate(nextName = null) {
async doUpdate(){
try {
if (nextName){
this.formData['nextName'] = nextName
}
if (this.formData.recordType === 'zj'){
this.formData.ticketsWorkStatus = '03'
this.formData['isFinish'] = '1'
@ -173,17 +136,13 @@ export default {
await this.$refs.formRef.validate()
this.formLoading = true
await updateStatus(this.formData)
if (!nextName) {
this.$modal.msgSuccess("操作成功")
}
this.dialogVisible = false
this.$emit("success")
}else {
this.formLoading = true
await updateStatus(this.formData)
if (nextName) {
this.$modal.msgSuccess("操作成功")
}
this.dialogVisible = false
this.$emit("success")
}
@ -198,36 +157,25 @@ export default {
this.formData.item.itemStatus = "03"
//
if (this.isNext){
this.formData['finishType'] = "01"
await this.$refs.updateRepair.open(this.clickRow)
return
}
//
if (this.isEndCheck){
this.formData['finishType'] = "02"
this.formData.ticketsWorkStatus = "05"
await this.doUpdate();
return
}
// ,
this.formData.ticketsWorkStatus = "03"
this.formData['finishType'] = "03"
this.formData['isFinish'] = '1'
await this.doUpdate()
} catch {
}
}catch{}
}
}
}
</script>
<style scoped lang="scss">
.notice {
display: inline-block;
width: 100%;
text-align: center;
margin: 1rem 0;
font-size: 18px;
color: red;
}
</style>

View File

@ -208,7 +208,7 @@ export default {
await updateRepair(this.formData)
this.$modal.msgSuccess("指派成功")
this.dialogVisible = false
this.$emit("success", this.formData.nowRepairName)
this.$emit("success")
} catch {
}