|
@@ -1,6 +1,40 @@
|
|
|
<template>
|
|
|
<div class="student-sop flex flex-col h-full">
|
|
|
- <SearchForm :fields="fields" :params="params"></SearchForm>
|
|
|
+ <div class="page-action">
|
|
|
+ <t-button
|
|
|
+ theme="primary"
|
|
|
+ :disabled="!selectedRowKeys.length"
|
|
|
+ @click="handleBatchCancel"
|
|
|
+ >
|
|
|
+ <template #icon><svg-icon name="delete" color="#262626" /></template>
|
|
|
+ 作废
|
|
|
+ </t-button>
|
|
|
+ <t-button variant="outline" @click="handleAdd">
|
|
|
+ <template #icon><svg-icon name="view" color="#262626" /></template>
|
|
|
+ 显示字段</t-button
|
|
|
+ >
|
|
|
+ <t-button variant="outline" @click="handleAdd">
|
|
|
+ <template #icon><svg-icon name="refresh" color="#262626" /></template>
|
|
|
+ 刷新</t-button
|
|
|
+ >
|
|
|
+ <t-button variant="outline" @click="handleAdd">
|
|
|
+ <template #icon><svg-icon name="sort" color="#262626" /></template>
|
|
|
+ 排序</t-button
|
|
|
+ >
|
|
|
+ <t-button variant="outline" @click="handleAdd">
|
|
|
+ <template #icon><svg-icon name="enlarge" color="#262626" /></template>
|
|
|
+ 放大</t-button
|
|
|
+ >
|
|
|
+ <t-button variant="outline" @click="handleAdd">
|
|
|
+ <template #icon><svg-icon name="shrink" color="#262626" /></template>
|
|
|
+ 缩小</t-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <SearchForm :fields="fields" :params="params">
|
|
|
+ <template #service="{ item, params }">
|
|
|
+ <select-service-unit v-model="params[item.prop]"></select-service-unit>
|
|
|
+ </template>
|
|
|
+ </SearchForm>
|
|
|
|
|
|
<div class="flex-1 page-wrap">
|
|
|
<div class="btn-group">
|
|
@@ -22,9 +56,29 @@
|
|
|
showPageSize: false,
|
|
|
total: pagination.total,
|
|
|
}"
|
|
|
+ v-loading="tableLoading"
|
|
|
:selected-row-keys="selectedRowKeys"
|
|
|
@select-change="selectChange"
|
|
|
>
|
|
|
+ <template #operate="{ row }">
|
|
|
+ <div class="table-operations" @click.stop>
|
|
|
+ <t-link theme="primary" hover="color" @click="toCurSopFlow(row)">
|
|
|
+ 填报
|
|
|
+ </t-link>
|
|
|
+ <t-link theme="primary" hover="color" @click="createSopFlow(row)">
|
|
|
+ 新增SOP
|
|
|
+ </t-link>
|
|
|
+ <t-link theme="primary" hover="color" @click="toCurSopFlow(row)">
|
|
|
+ 新增违规
|
|
|
+ </t-link>
|
|
|
+ <t-link theme="primary" hover="color" @click="toCurSopFlow(row)">
|
|
|
+ 上报质量问题
|
|
|
+ </t-link>
|
|
|
+ <t-link theme="primary" hover="color" @click="planChange(row)">
|
|
|
+ 计划变更报备
|
|
|
+ </t-link>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</t-table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -32,7 +86,7 @@
|
|
|
|
|
|
<script setup lang="jsx" name="StudentSop">
|
|
|
import { ref, reactive } from 'vue';
|
|
|
-import { getTableData } from '@/api/test';
|
|
|
+import { sopBatchCancelApi } from '@/api/sop';
|
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
|
const selectedRowKeys = ref([]);
|
|
|
const selectChange = (value, { selectedRowData }) => {
|
|
@@ -45,88 +99,91 @@ const columns = [
|
|
|
width: 50,
|
|
|
fixed: 'left',
|
|
|
},
|
|
|
- { colKey: 'a', title: '服务单元' },
|
|
|
+ { colKey: 'serviceName', title: '服务单元' },
|
|
|
+ { colKey: 'sopNo', title: 'SOP流水号' },
|
|
|
+ { colKey: 'crmNo', title: '项目单号' },
|
|
|
+ { colKey: 'beginTime', title: '派单时间' },
|
|
|
+ { colKey: 'customManagerName', title: '客户经理' },
|
|
|
+ { colKey: 'customManagerTypeStr', title: '客户类型' },
|
|
|
+ { colKey: 'customName', title: '客户名称' },
|
|
|
+ { colKey: 'crmName', title: '项目名称' },
|
|
|
+ { colKey: 'productName', title: '实施产品' },
|
|
|
+ { colKey: 'examStartTime', title: '考试开始时间' },
|
|
|
+ { colKey: 'examEndTime', title: '考试结束时间' },
|
|
|
+ //...
|
|
|
+ { colKey: 'flowCreateName', title: '提交人' },
|
|
|
+ { colKey: 'flowCreateTime', title: '提交时间' },
|
|
|
+ { colKey: 'flowUpdateTime', title: '更新时间' },
|
|
|
+ { colKey: 'status', title: '流程状态' },
|
|
|
+ { colKey: 'taskName', title: '流程节点' },
|
|
|
+ { colKey: 'pendApproveName', title: '当前节点负责人' },
|
|
|
{
|
|
|
title: '管理',
|
|
|
colKey: 'operate',
|
|
|
fixed: 'right',
|
|
|
width: 240,
|
|
|
- cell: (h, { row }) => {
|
|
|
- return (
|
|
|
- <div class="table-operations">
|
|
|
- <t-link
|
|
|
- theme="primary"
|
|
|
- hover="color"
|
|
|
- onClick={(e) => {
|
|
|
- e.stopPropagation();
|
|
|
- toCurSopFlow(row);
|
|
|
- }}
|
|
|
- >
|
|
|
- 填报
|
|
|
- </t-link>
|
|
|
- <t-link
|
|
|
- theme="primary"
|
|
|
- hover="color"
|
|
|
- onClick={(e) => {
|
|
|
- e.stopPropagation();
|
|
|
- createSopFlow(row);
|
|
|
- }}
|
|
|
- >
|
|
|
- 新增SOP
|
|
|
- </t-link>
|
|
|
- <t-link
|
|
|
- theme="primary"
|
|
|
- hover="color"
|
|
|
- onClick={(e) => {
|
|
|
- e.stopPropagation();
|
|
|
- }}
|
|
|
- >
|
|
|
- 新增违规
|
|
|
- </t-link>
|
|
|
- <t-link
|
|
|
- theme="primary"
|
|
|
- hover="color"
|
|
|
- onClick={(e) => {
|
|
|
- e.stopPropagation();
|
|
|
- }}
|
|
|
- >
|
|
|
- 上报质量问题
|
|
|
- </t-link>
|
|
|
- <t-link
|
|
|
- theme="primary"
|
|
|
- hover="color"
|
|
|
- onClick={(e) => {
|
|
|
- e.stopPropagation();
|
|
|
- planChange(row);
|
|
|
- }}
|
|
|
- >
|
|
|
- 计划变更报备
|
|
|
- </t-link>
|
|
|
- </div>
|
|
|
- );
|
|
|
- },
|
|
|
},
|
|
|
];
|
|
|
const fields = ref([
|
|
|
{
|
|
|
- prop: 'a',
|
|
|
+ prop: 'serviceId',
|
|
|
label: '服务单元',
|
|
|
type: 'select',
|
|
|
labelWidth: 80,
|
|
|
colSpan: 5,
|
|
|
+ cell: 'service',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: 'buttons',
|
|
|
+ colSpan: 3,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ type: 'button',
|
|
|
+ text: '搜索',
|
|
|
+ onClick: () => {
|
|
|
+ search();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
]);
|
|
|
const params = reactive({
|
|
|
- a: '',
|
|
|
+ serviceId: '',
|
|
|
});
|
|
|
|
|
|
const {
|
|
|
loading: tableLoading,
|
|
|
pagination,
|
|
|
tableData,
|
|
|
- fetchData,
|
|
|
+ search,
|
|
|
onChange,
|
|
|
} = useFetchTable(getTableData);
|
|
|
+
|
|
|
+const handleAdd = () => {};
|
|
|
+
|
|
|
+const handleBatchCancel = () => {
|
|
|
+ if (!selectedRowKeys.value.length) {
|
|
|
+ MessagePlugin.error('请选择要作废的记录');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const confirmDia = DialogPlugin({
|
|
|
+ header: '系统通知',
|
|
|
+ body: `是否作废所选sop?`,
|
|
|
+ confirmBtn: '确定',
|
|
|
+ cancelBtn: '取消',
|
|
|
+ theme: 'warning',
|
|
|
+ onConfirm: async () => {
|
|
|
+ confirmDia.hide();
|
|
|
+ const res = await sopBatchCancelApi(selectedRowKeys.value).catch(
|
|
|
+ () => {}
|
|
|
+ );
|
|
|
+ if (!res) return;
|
|
|
+ MessagePlugin.success('操作成功');
|
|
|
+ refresh();
|
|
|
+ },
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
const createSopFlow = (row) => {
|
|
|
router.push({ name: 'StuSopStep' });
|
|
|
};
|
|
@@ -139,5 +196,3 @@ const planChange = (row) => {
|
|
|
showPlanChangeDialog.value = true;
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
-<style></style>
|