点击项目完成时,先提示是否移交总检?
This commit is contained in:
parent
2222a406f5
commit
a79c5c6dc6
@ -47,25 +47,47 @@
|
||||
</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' && projectList.length > 0" type="primary"
|
||||
@click="doUpdate(null)">确
|
||||
定
|
||||
</el-button>
|
||||
<el-button v-if="formData.recordType === 'sgwczj' && projectList.length !== 0" type="primary" @click="doUpdate(null)">
|
||||
<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(true)">
|
||||
完成并移交下一班组
|
||||
</el-button>
|
||||
<el-button v-if="formData.recordType === 'sgwczj' && !isNext && projectList.length !== 0" type="primary"
|
||||
@click="doFinish(false)">
|
||||
{{ isEndCheck ? "完成并移交总检" : "完成工单" }}
|
||||
<el-button v-if="formData.recordType === 'sgwczj' && projectList.length !== 0" type="primary"
|
||||
@click="handleFinish">
|
||||
完成
|
||||
</el-button>
|
||||
<!-- <el-button v-if="formData.recordType === 'sgwczj' && projectList.length !== 0" type="primary" @click="doFinish(true)">-->
|
||||
<!-- 完成并移交下一班组-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button v-if="formData.recordType === 'sgwczj' && !isNext && projectList.length !== 0" type="primary"-->
|
||||
<!-- @click="doFinish(false)">-->
|
||||
<!-- {{ isEndCheck ? "完成并移交总检" : "完成工单" }}-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button v-if="formData.recordType === 'sgwczj'" type="success" @click="doFinish">-->
|
||||
<!-- {{isNext ? "整体完成并指派下一项目" : (isEndCheck ? "整体完成并移交总检" : "整体完成")}}-->
|
||||
<!-- </el-button>-->
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="选择"
|
||||
:visible.sync="chooseVisible"
|
||||
width="30%">
|
||||
<span>{{isEndCheck ? '这个工单需要总检,' : '这个工单不需要总检,'}}请选择完成方式</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" v-if="formData.recordType === 'sgwczj' && projectList.length !== 0"
|
||||
@click="doFinish(true)">完成并移交下一班组</el-button>
|
||||
<el-button v-if="formData.recordType === 'sgwczj' && !isNext && projectList.length !== 0" type="primary"
|
||||
@click="doFinish(false)">
|
||||
{{ isEndCheck ? "完成并移交总检" : "完成工单" }}
|
||||
</el-button>
|
||||
<el-button @click="chooseVisible = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<UpdateRepair ref="updateRepair" @success="doUpdate"/>
|
||||
</div>
|
||||
</template>
|
||||
@ -104,10 +126,14 @@ export default {
|
||||
isNext: false,
|
||||
// 是否需要总检
|
||||
isEndCheck: true,
|
||||
clickRow: null
|
||||
clickRow: null,
|
||||
chooseVisible: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleFinish() {
|
||||
this.chooseVisible = true
|
||||
},
|
||||
init() {
|
||||
this.formData = {
|
||||
// 主表信息
|
||||
@ -162,7 +188,7 @@ export default {
|
||||
},
|
||||
async doUpdate(nextName = null) {
|
||||
try {
|
||||
if (nextName){
|
||||
if (nextName) {
|
||||
this.formData['nextName'] = nextName
|
||||
}
|
||||
if (this.formData.recordType === 'zj') {
|
||||
@ -177,6 +203,7 @@ export default {
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
}
|
||||
this.dialogVisible = false
|
||||
this.chooseVisible = false
|
||||
this.$emit("success")
|
||||
} else {
|
||||
this.formLoading = true
|
||||
@ -185,6 +212,7 @@ export default {
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
}
|
||||
this.dialogVisible = false
|
||||
this.chooseVisible = false
|
||||
this.$emit("success")
|
||||
}
|
||||
} catch {
|
||||
@ -192,6 +220,9 @@ export default {
|
||||
},
|
||||
async doFinish(flag) {
|
||||
try {
|
||||
if (!this.formData.item.id){
|
||||
this.$modal.msgError("请先选择要完成的项目")
|
||||
}
|
||||
await this.$refs.formRef.validate()
|
||||
this.formLoading = true
|
||||
// 不论是什么按钮,这个工单子项是完了的
|
||||
|
Loading…
Reference in New Issue
Block a user