zhangjie 1 سال پیش
والد
کامیت
8b66fa2ee7

+ 63 - 24
src/api/sop.js

@@ -1,37 +1,38 @@
 import { request } from '@/utils/request.js';
 
-//延期预警列表
+// 延期预警 ------------------->
+// 延期预警列表
 export const getDelayWarnList = (data) =>
   request({
     url: '/api/admin/tb/delay/warn/query',
     params: data,
   });
 
-//关闭单个延期预警
+// 关闭单个延期预警
 export const closeDelayWarn = (id) =>
   request({
     url: '/api/admin/tb/delay/warn/close?id=' + id,
     loading: true,
   });
-//重启延期预警
+// 重启延期预警
 export const restartDelayWarn = (id) =>
   request({
     url: '/api/admin/tb/delay/warn/restart?id=' + id,
     loading: true,
   });
-//单个延期预警的详情
+// 单个延期预警的详情
 export const delayWarnDetail = (id) =>
   request({
     url: '/api/admin/tb/delay/warn/get?id=' + id,
     method: 'get',
   });
-//延期预警明细表
+// 延期预警明细表
 export const delayWarnDetailList = (id) =>
   request({
     url: '/api/admin/tb/delay/warn/detail/list?id=' + id,
   });
 
-//延期预警跟进提交
+// 延期预警跟进提交
 export const flowDelayWarn = (data) =>
   request({
     url: '/api/admin/tb/delay/warn/detail/save',
@@ -39,43 +40,46 @@ export const flowDelayWarn = (data) =>
     loading: true,
   });
 
-//违规登记列表
+// 违规登记 ------------------->
+// 违规登记列表
 export const getViolationList = (data) =>
   request({
     url: '/api/admin/tb/violation/query',
     params: data,
   });
-//关闭单个违规登记
+// 关闭单个违规登记
 export const closeViolation = (id) =>
   request({
     url: '/api/admin/tb/violation/close?id=' + id,
     loading: true,
   });
-//重启违规登记
+// 重启违规登记
 export const restartViolation = (id) =>
   request({
     url: '/api/admin/tb/violation/restart?id=' + id,
     loading: true,
   });
-//单个违规登记的详情
+// 单个违规登记的详情
 export const violationDetail = (id) =>
   request({
     url: '/api/admin/tb/violation/get?id=' + id,
     method: 'get',
   });
-//违规登记明细表
+// 违规登记明细表
 export const violationDetailList = (id) =>
   request({
     url: '/api/admin/tb/violation/detail/query?id=' + id,
   });
-//违规登记跟进提交
+// 违规登记跟进提交
 export const flowViolation = (data) =>
   request({
     url: '/api/admin/tb/violation/detail/save',
     data,
     loading: true,
   });
-//sop管理 - 设备出入库登记查询
+
+// 设备出入库 ------------------->
+// 设备出入库登记查询
 export const deviceOutInSearch = (params) =>
   request({
     url: '/api/admin/device/in/out/sop_page',
@@ -87,32 +91,34 @@ export const deviceCanOut = (params) =>
     params,
   });
 
-//查询可入库的设备信息
+// 查询可入库的设备信息
 export const deviceCanIn = (params) =>
   request({
     url: '/api/admin/device/in/out/can_in_info',
     params,
   });
 
-//设备出入库,提交
+// 设备出入库,提交
 export const deviceOutInSave = (data) =>
   request({
     url: '/api/admin/device/in/out/submit',
     data,
   });
-//项目计划变更列表
+
+// 项目计划变更 ------------------->
+// 项目计划变更列表
 export const planChangeList = (params) =>
   request({
     url: '/api/admin/project/exchange/list',
     params,
   });
-//项目变更计划申请(第一步)
+// 项目变更计划申请(第一步)
 export const createPlanChange = (data) =>
   request({
     url: '/api/admin/ding/exception/apply/save',
     data,
   });
-//项目变更计划审批
+// 项目变更计划审批
 export const approvePlanChange = (params) =>
   request({
     url: '/api/admin/project/exchange/flow/approve',
@@ -120,28 +126,61 @@ export const approvePlanChange = (params) =>
     loading: true,
   });
 
-//获取流程部署信息接口
+// 流程相关 ------------------->
+// 获取流程部署信息接口
 export const getFlowDeployment = () =>
   request({
     url: '/api/admin/flow/deployment/data',
   });
 
-//流程详细信息接口
+// 流程详细信息接口
 export const getFlowDetail = (data) =>
   request({
     url: '/api/admin/flow/view',
     data,
   });
 
-//sop列表
-export const getSopList = (data) =>
+// sop管理 ------------------->
+export const sopListApi = (data) =>
   request({
     url: '/api/admin/sop/list',
     data,
   });
-//sop填报
-export const getSopFlowView = (params) =>
+// sop填报
+export const sopFlowViewApi = (params) =>
   request({
     url: '/api/admin/flow/view',
     params,
   });
+export const sopApplyApi = (params) =>
+  request({
+    url: '/api/admin/sop/apply',
+    data: params,
+  });
+export const sopApproveApi = (params) =>
+  request({
+    url: '/api/admin/sop/approve',
+    data: params,
+  });
+// sop作废
+export const sopCancelApi = (flowId) =>
+  request({
+    url: '/api/admin/sop/cancel',
+    params: { flowId },
+  });
+// sop批量作废
+export const sopBatchCancelApi = (flowIds) =>
+  request({
+    url: '/api/admin/sop/batch/cancel',
+    data: { flowIds },
+  });
+export const sopEditApi = (sopId) =>
+  request({
+    url: '/api/admin/sop/edit',
+    params: { sopId },
+  });
+export const sopSaveApi = (data) =>
+  request({
+    url: '/api/admin/sop/save',
+    data,
+  });

+ 13 - 0
src/assets/icons/icon-shrink.svg

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="11.7071066px" height="11.7071056px" viewBox="0 0 11.7071066 11.7071056" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>icon-缩小</title>
+    <g id="SOP管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="10.10-教务处SOP管理-全屏" transform="translate(-534.1465, -26.1465)">
+            <g id="icon-缩小" transform="translate(532, 24)">
+                <rect id="fullscreen-exit-(Background)" opacity="0" x="0" y="0" width="16" height="16"></rect>
+                <path d="M6.50003815,3.00003785 L7.50003815,3.00003779 L7.50003815,7.00003719 C7.50003809,7.27617955 7.2761805,7.50003716 7.00003815,7.50003725 L3.00003803,7.50003767 L3.00003803,7.50003767 L3.00003797,6.50003767 L5.79293156,6.50003719 L2.14648437,2.85359126 L2.85359091,2.14648438 L6.50003815,5.79293084 L6.50003815,3.00003785 Z M9.50003815,13.0000372 L8.50003815,13.0000372 L8.50003815,9.00003767 C8.50003815,8.7238953 8.72389577,8.50003767 9.00003815,8.50003767 L13.0000381,8.50003767 L13.0000381,8.50003767 L13.0000381,9.50003719 L10.2071447,9.50003719 L13.853591,13.1464844 L13.1464844,13.85359 L9.50003815,10.2071438 L9.50003815,13.0000372 Z" id="fullscreen-exit" fill-opacity="0.9" fill="#000000"></path>
+                <path d="M6.50003815,3.00003785 L7.50003815,3.00003779 L7.50003815,7.00003719 C7.50003809,7.27617955 7.2761805,7.50003716 7.00003815,7.50003725 L3.00003803,7.50003767 L3.00003803,7.50003767 L3.00003797,6.50003767 L5.79293156,6.50003719 L2.14648437,2.85359126 L2.85359091,2.14648438 L6.50003815,5.79293084 L6.50003815,3.00003785 Z M9.50003815,13.0000372 L8.50003815,13.0000372 L8.50003815,9.00003767 C8.50003815,8.7238953 8.72389577,8.50003767 9.00003815,8.50003767 L13.0000381,8.50003767 L13.0000381,8.50003767 L13.0000381,9.50003719 L10.2071447,9.50003719 L13.853591,13.1464844 L13.1464844,13.85359 L9.50003815,10.2071438 L9.50003815,13.0000372 Z" id="fullscreen-exit" fill-opacity="0.9" fill="#000000" transform="translate(8, 8) scale(1, -1) translate(-8, -8)"></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 3 - 0
src/layout/index.vue

@@ -252,6 +252,9 @@ watch(
     :deep(.t-menu__item:not(.t-is-active)) {
       color: #262626;
     }
+    :deep(.t-menu__item:not(.t-is-disabled):hover) {
+      background-color: #e8f3ff;
+    }
     :deep(.t-menu__item.t-is-active) {
       color: var(--td-brand-color);
       background-color: #e8f3ff;

+ 2 - 2
src/views/service-unit/dispatch/dispatch-manage/index.vue

@@ -11,8 +11,8 @@
         @click="handleBatchDisable"
       >
         <template #icon><svg-icon name="delete" color="#262626" /></template>
-        作废</t-button
-      >
+        作废
+      </t-button>
       <t-button
         variant="outline"
         :disabled="!selectedRowKeys.length"

+ 2 - 2
src/views/sop/sop-manage/office-sop/index.vue

@@ -44,7 +44,7 @@
 import { ref, reactive, computed } from 'vue';
 import useFetchTable from '@/hooks/useFetchTable';
 import { useRouter } from 'vue-router';
-import { getSopList } from '@/api/sop';
+import { sopListApi } from '@/api/sop';
 // import PlanChangeDialog from './plan-change-dialog.vue';
 // const curRow = ref(null);
 const selectedRowKeys = ref([]);
@@ -162,7 +162,7 @@ const {
   tableData,
   fetchData,
   onChange,
-} = useFetchTable(getSopList, { params: transParams });
+} = useFetchTable(sopListApi, { params: transParams });
 
 const createSopFlow = (row) => {
   router.push({ name: 'SopStep' });

+ 2 - 2
src/views/sop/sop-manage/sop-step/index.vue

@@ -55,7 +55,7 @@
 import { ref, computed, watch } from 'vue';
 import MyFormItem from '../../components/my-form-item.vue';
 import { useRouter, useRoute } from 'vue-router';
-import { getSopFlowView } from '@/api/sop';
+import { sopFlowViewApi } from '@/api/sop';
 import bus from '@/utils/bus';
 // import testData from '../test';
 const needValueCodes = [
@@ -97,7 +97,7 @@ const curStep = ref('');
 const flowId = route.query.flowId;
 const initFill = () => {
   loading.value = true;
-  getSopFlowView({ flowId }).then((res) => {
+  sopFlowViewApi({ flowId }).then((res) => {
     loading.value = false;
     curStep.value = res.currFlowTaskResult.taskName;
     res.flowTaskHistoryList = res.flowTaskHistoryList || [];

+ 117 - 62
src/views/sop/sop-manage/student-sop/index.vue

@@ -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>