维修工单删除和作废

This commit is contained in:
xiaofajia 2024-11-04 11:24:19 +08:00
parent 530c652fd4
commit e26e530757
2 changed files with 28 additions and 3 deletions

View File

@ -50,6 +50,9 @@
<el-button v-hasPermi="['repair:tkm:remove']" size="mini" type="text" icon="el-icon-remove" @click="handleRemove(scope.row)">
删除
</el-button>
<el-button v-hasPermi="['repair:tkm:void']" size="mini" type="text" icon="el-icon-delete" @click="handleVoid(scope.row)">
作废
</el-button>
<el-button v-if="userRole === 'service_advisor' && isFinish" size="mini" type="text" icon="el-icon-refresh" @click="handleEditRecord(scope.row)">
维修记录设置
</el-button>
@ -162,7 +165,7 @@
</template>
<script>
import {getPageType, updateTake, getTicketsById, removeTicketById} from "@/api/repair/tickets/Tickets";
import {getPageType, updateTake, getTicketsById, removeTicketById, setTicketsVoid} from "@/api/repair/tickets/Tickets";
import TicketsShow from "@/views/repair/tickets/Components/TicketsShow.vue";
import UpdateRepair from "@/views/repair/tickets/form/UpdateRepair.vue";
import TWOperate from "@/views/repair/tickets/form/TWOperate.vue";
@ -422,7 +425,29 @@ export default {
this.$modal.msgSuccess("删除成功")
}
}catch{}
}
},
async handleVoid(row) {
this.$prompt('作废备注', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({value}) => {
const data = {
id: row.id,
remark: value,
ticketsStatus: "03"
}
this.doVoid(data)
}).catch(() => {
})
},
async doVoid(data) {
try {
await setTicketsVoid(data)
this.$modal.msgSuccess("作废成功")
await this.listTickets()
} catch {
}
},
}
}
</script>

View File

@ -112,7 +112,7 @@
<!-- >返结-->
<!-- </el-button>-->
<el-button v-if="TicketType !== 'tv'" size="mini" type="text" icon="el-icon-delete"
@click="handleVoid(scope.row)"
@click="handleVoid(scope.row)" v-hasPermi="['repair:tk:void']"
>作废
</el-button>
<el-button size="mini" type="text" icon="el-icon-printer"