From c3134fc7e80387bd042bc6054b1d1a151524ba39 Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期三, 11 十二月 2024 17:45:44 +0800 Subject: [PATCH] 生产管理平台-生产流程 --- src/views/process/order-temp/list.vue | 232 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 232 insertions(+), 0 deletions(-) diff --git a/src/views/process/order-temp/list.vue b/src/views/process/order-temp/list.vue new file mode 100644 index 0000000..e9ba689 --- /dev/null +++ b/src/views/process/order-temp/list.vue @@ -0,0 +1,232 @@ +<template> + <!-- 搜索 --> + <ContentWrap> + <el-form + class="-mb-15px" + :model="queryParams" + ref="queryFormRef" + :inline="true" + label-width="68px" + > + <el-form-item label="开始时间"> + <el-date-picker + size="mini" + v-model="queryParams.startTime" + format="YYYY-MM-DD HH:mm:00" + value-format="YYYY-MM-DD HH:mm:00" + type="datetime" + :clearable="false" + placeholder="选择日期时间"/> + </el-form-item> + <el-form-item label="结束时间"> + <el-date-picker + size="mini" + v-model="queryParams.endTime" + format="YYYY-MM-DD HH:mm:00" + value-format="YYYY-MM-DD HH:mm:00" + type="datetime" + :clearable="false" + placeholder="选择日期时间"/> + </el-form-item> + <el-form-item label="工单类型" prop="xsmz"> + <el-select + v-model="queryParams.xsmz" + class="!w-240px" + clearable + placeholder="请选择工单类型" + > + <el-option + v-for="dict in getIntDictOptions(DICT_TYPE.PMS_XSMZ)" + :key="dict.value" + :label="dict.label" + :value="dict.value" + /> + </el-select> + </el-form-item> + <el-form-item> + <el-button @click="handleQuery"> + <Icon icon="ep:search" class="mr-5px"/> + 搜索 + </el-button> + <el-button @click="resetQuery"> + <Icon icon="ep:refresh" class="mr-5px"/> + 重置 + </el-button> + <el-button + type="primary" + plain + @click="openForm('create')" + v-hasPermi="['data:point:create']" + > + <Icon icon="ep:plus" class="mr-5px"/> + 新增 + </el-button> + </el-form-item> + </el-form> + </ContentWrap> + + <!-- 列表 --> + <ContentWrap> + <el-table border stripe v-loading="loading" :data="list"> + + <el-table-column type="index" header-align="center" align="center" width="50" label="序号"/> + <el-table-column prop="statusName" header-align="center" align="center" width="80" label="状态"> + <template #default="scope"> + <el-tag v-if="scope.row.status === '0'" size="small" effect="dark" color="#b8d900" + style="border: 0px; padding-top: 1px">待处理 + </el-tag> + <el-tag v-if="scope.row.status === '1'" size="small" effect="dark" color="#3290f9" + style="border: 0px; padding-top: 1px">处理中 + </el-tag> + <el-tag v-if="scope.row.status === '2'" size="small" effect="dark" color="#00b5ad" + style="border: 0px; padding-top: 1px">已完成 + </el-tag> + <el-tag v-if="scope.row.status === '3'&&scope.row.bpmStatus === 2" size="small" + effect="dark" color="#ffb517" style="border: 0px; padding-top: 1px">待审核 + </el-tag> + <el-tag v-if="scope.row.status === '3'&&scope.row.bpmStatus === 1" size="small" + effect="dark" color="purple" style="border: 0px; padding-top: 1px">未提交 + </el-tag> + <el-tag v-if="scope.row.status === '3'&&scope.row.bpmStatus === 0" size="small" + effect="dark" color="pink" style="border: 0px; padding-top: 1px">已撤回 + </el-tag> + </template> + </el-table-column> + <el-table-column prop="priorityName" header-align="center" align="center" width="100" + label="优先级"/> + <el-table-column prop="orderNumber" header-align="center" align="center" min-width="140" + label="工单编号"/> + <el-table-column prop="title" header-align="center" align="left" width="200" label="工单标题"/> + <el-table-column prop="content" header-align="center" align="left" min-width="200" + label="工单内容"/> + <el-table-column prop="publisherName" header-align="center" align="center" width="80" + label="发布人"/> + <el-table-column prop="assignerName" header-align="center" align="center" width="80" + label="办理人"/> + <el-table-column prop="publishTime" header-align="center" align="center" min-width="150" + label="发布时间"/> + <el-table-column prop="deadline" header-align="center" align="center" min-width="150" + label="截止时间"/> + <el-table-column prop="isTimeout" header-align="center" align="center" width="80" + label="是否超时"> + <template #default="scope"> + <el-tag v-if="scope.row.isTimeout === '0'">否</el-tag> + <el-tag v-if="scope.row.isTimeout === '1'" type="danger">是</el-tag> + </template> + </el-table-column> + <el-table-column prop="processStartTime" header-align="center" align="center" width="120" + label="受理时间"/> + <el-table-column label="操作" fixed="right" header-align="center" align="center" + width="180"> + <template #default="scope"> + <el-button type="text" size="small" v-if="scope.row.status === '0'" + @click="addOrUpdateHandle(scope.row.id)">修改 + </el-button> + <el-button type="text" size="small" v-if="scope.row.status === '0'" + @click="assign(scope.row.id,scope.row.orderNumber)">指派 + </el-button> + <el-button type="text" size="small" v-if="scope.row.status === '0'" + @click="deleteHandle(scope.row.id)">删除 + </el-button> + <el-button type="text" size="small" @click="orderTaskHandleView(scope.row.id)">详情 + </el-button> + <el-button v-if="scope.row.bpmStatus === 2" @click="clickCancelProcess(scope.row)" + type="text" size="small">撤回 + </el-button> + <el-button v-if="scope.row.bpmStatus === 0" @click="clickSubmitApply(scope.row)" + type="text" size="small">重新申请 + </el-button> + <el-button v-if="scope.row.bpmStatus === 1" @click="clickSubmitApply(scope.row)" + type="text" size="small">提交申请 + </el-button> + </template> + </el-table-column> + </el-table> + <!-- 分页 --> + <Pagination + :total="total" + v-model:page="queryParams.pageNo" + v-model:limit="queryParams.pageSize" + @pagination="getList" + /> + </ContentWrap> + <!--电耗明细--> + <Form ref="formRef"/> +</template> +<script lang="ts" setup> + import {DICT_TYPE, getIntDictOptions} from '@/utils/dict' + import * as OrderTemp from '@/api/process/temp' + import {ref} from "vue"; + + defineOptions({name: 'OrderTemp'}) + + const message = useMessage() // 消息弹窗 + const {t} = useI18n() // 国际化 + + const loading = ref(true) // 列表的加载中 + const total = ref(0) // 列表的总页数 + const list = ref([]) // 列表的数据 + const queryParams = reactive({ + pageNo: 1, + pageSize: 10, + startDate: undefined, + endDate: undefined, + xsmz: undefined + }) + const queryFormRef = ref() // 搜索的表单 + + /** 查询列表 */ + const getList = async () => { + loading.value = true + try { + const page = await OrderTemp.getOrderTempPage(queryParams) + list.value = page.list + total.value = page.total + } finally { + loading.value = false + } + } + + /** 搜索按钮操作 */ + const handleQuery = () => { + queryParams.pageNo = 1 + getList() + } + + /** 查看数据操作 */ + const chartView = ref() + const chartHandle = (raw: object) => { + chartView.value.open(raw) + } + + /** 重置按钮操作 */ + const resetQuery = () => { + queryFormRef.value.resetFields() + handleQuery() + } + + /** 添加/修改操作 */ + const formRef = ref() + const openForm = (type: string, id?: number) => { + formRef.value.open(type, id) + } + + /** 删除按钮操作 */ + const handleDelete = async (id: number) => { + try { + // 删除的二次确认 + await message.delConfirm() + // 发起删除 + await OrderTemp.deleteOrderTemp(id) + message.success(t('common.delSuccess')) + // 刷新列表 + await getList() + } catch { + } + } + + /** 初始化 **/ + onMounted(async () => { + await getList() + }) +</script> -- Gitblit v1.9.3