刘洋 9 months ago
parent
commit
1780dc8186

+ 21 - 0
src/api/sop.js

@@ -158,6 +158,27 @@ export const sopListApi = (data) =>
     url: '/api/admin/sop/list',
     data,
   });
+export const getSopDataBySopNo = (sopNo) => {
+  let type = sopNo?.startsWith('SOP_O')
+    ? 'OFFICE_SOP_FLOW'
+    : sopNo?.startsWith('SOP_C')
+    ? 'CLOUD_MARK_SOP_FLOW'
+    : '';
+  return request({
+    url: '/api/admin/sop/list',
+    data: {
+      pageNumber: 1,
+      pageSize: 10,
+      serviceId: '',
+      formWidgetMetadataViewList: [],
+      formWidgetMetadataConditionList: [
+        { fieldId: 'sopNo', operator: 'EQ', fieldValue: sopNo },
+      ],
+      type,
+    },
+    loading: true,
+  });
+};
 // sop申请
 export const sopApplyApi = (params) =>
   request({

+ 1 - 1
src/layout/index.vue

@@ -24,7 +24,7 @@
       </div>
       <div class="app-menu-footer"></div>
     </t-aside>
-    <t-aside v-if="appStore.showSubmenu" class="app-submenu" width="232px">
+    <t-aside v-if="appStore.showSubmenu" class="app-submenu" width="186px">
       <left-menu class="app-submenu-body"></left-menu>
       <div class="app-submenu-footer">
         <t-dropdown

+ 7 - 0
src/layout/left-menu.vue

@@ -60,3 +60,10 @@ const setOpenMenu = () => {
   // }
 };
 </script>
+<style lang="less" scoped>
+.left-menu {
+  :deep(.t-default-menu) {
+    width: 186px !important;
+  }
+}
+</style>

+ 31 - 2
src/views/project-quality/project-quality-manage/issues-feedback/index.vue

@@ -44,6 +44,13 @@
         :selected-row-keys="selectedRowKeys"
         @select-change="selectChange"
       >
+        <template #sopNo="{ col, row }">
+          <more-content
+            v-if="col?.colKey === 'sopNo'"
+            :content="row[col.colKey]"
+            @action="editSopFlowHandle(row.sopNo, 'view')"
+          ></more-content>
+        </template>
         <template #problemNo="{ col, row }">
           <more-content
             :content="row[col.colKey]"
@@ -91,6 +98,12 @@
       :type="curType"
       @confirm="fetchData"
     ></quality-issue-dialog>
+    <sop-step-dialog
+      v-model:visible="showSopStepDialog"
+      :sop="curSopData2"
+      :type="curSopType"
+      @confirm="fetchData"
+    ></sop-step-dialog>
   </div>
 </template>
 
@@ -119,6 +132,21 @@ import {
   ISSUES_TYPE,
 } from '@/config/constants';
 import usePermission from '@/hooks/usePermission';
+import { getSopDataBySopNo } from '@/api/sop';
+import SopStepDialog from '@/views/sop/sop-manage/sop-step/sop-step-dialog.vue';
+
+const curSopData2 = ref({});
+const showSopStepDialog = ref(false);
+const curSopType = ref('');
+const editSopFlowHandle = async (sopNo, type = 'fill') => {
+  curSopType.value = type;
+  getSopDataBySopNo(sopNo).then((res) => {
+    if (res?.records?.length) {
+      curSopData2.value = res.records[0];
+      showSopStepDialog.value = true;
+    }
+  });
+};
 const { perm } = usePermission();
 
 const selectedRowKeys = ref([]);
@@ -250,11 +278,12 @@ const columns = [
     fixed: 'left',
   },
   { colKey: 'problemNo', title: '质量问题编号', width: 200 },
-  { colKey: 'crmNo', title: '项目单号', width: 200 },
+  // { colKey: 'crmNo', title: '项目单号', width: 200 },
+  { colKey: 'sopNo', title: 'SOP流水号', width: 200 },
   { colKey: 'customType', title: '客户类型', cell: 'custom-type', width: 120 },
   { colKey: 'custom', title: '客户名称', width: 140 },
   // { colKey: 'productName', title: '实施产品' },
-  { colKey: 'sopTypeStr', title: '实施产品' },
+  { colKey: 'sopTypeStr', title: '实施产品', width: 120 },
   { colKey: 'summary', title: '问题简要' },
   { colKey: 'userNames', title: '责任人', width: 140 },
   { colKey: 'type', title: '问题类型', cell: 'issues-type', width: 120 },

+ 28 - 0
src/views/sop/sop-monitor/delay-warning/index.vue

@@ -31,6 +31,13 @@
             @action="handleDetail(row)"
           ></more-content>
         </template>
+        <template #sopNo="{ col, row }">
+          <more-content
+            v-if="col?.colKey === 'sopNo'"
+            :content="row[col.colKey]"
+            @action="editSopFlowHandle(row.sopNo, 'view')"
+          ></more-content>
+        </template>
         <template #type="{ col, row }">
           {{ warnTypeFilter(row[col.colKey]) }}
         </template>
@@ -89,6 +96,12 @@
       @success="fetchData"
       :enumFilter="enumFilter"
     ></delay-warn-flow-dialog>
+    <sop-step-dialog
+      v-model:visible="showSopStepDialog"
+      :sop="curSopData"
+      :type="curSopType"
+      @confirm="fetchData"
+    ></sop-step-dialog>
   </div>
 </template>
 
@@ -104,8 +117,23 @@ import { DialogPlugin, MessagePlugin } from 'tdesign-vue-next';
 import { warnTypeFilter, timestampFilter } from '@/utils/filter';
 import DelayWarnFlowDialog from './flow-dialog';
 import usePermission from '@/hooks/usePermission';
+import { getSopDataBySopNo } from '@/api/sop';
+import SopStepDialog from '../../sop-manage/sop-step/sop-step-dialog.vue';
 const { perm } = usePermission();
 
+const curSopData = ref({});
+const showSopStepDialog = ref(false);
+const curSopType = ref('');
+const editSopFlowHandle = async (sopNo, type = 'fill') => {
+  curSopType.value = type;
+  getSopDataBySopNo(sopNo).then((res) => {
+    if (res?.records?.length) {
+      curSopData.value = res.records[0];
+      showSopStepDialog.value = true;
+    }
+  });
+};
+
 const showDelayWarnFlowDialog = ref(false);
 const curRow = ref({});
 const viewType = ref('');

+ 28 - 0
src/views/sop/sop-monitor/violation-registration/index.vue

@@ -47,6 +47,13 @@
         }"
         v-loading="tableLoading"
       >
+        <template #sopNo="{ col, row }">
+          <more-content
+            v-if="col?.colKey === 'sopNo'"
+            :content="row[col.colKey]"
+            @action="editSopFlowHandle(row.sopNo, 'view')"
+          ></more-content>
+        </template>
         <template #code="{ col, row }">
           <more-content
             :content="row[col.colKey]"
@@ -110,6 +117,12 @@
       :type="viewType"
       @confirm="fetchData"
     ></violation-flow-dialog>
+    <sop-step-dialog
+      v-model:visible="showSopStepDialog"
+      :sop="curSopData"
+      :type="curSopType"
+      @confirm="fetchData"
+    ></sop-step-dialog>
   </div>
 </template>
 
@@ -125,8 +138,23 @@ import { DialogPlugin, MessagePlugin } from 'tdesign-vue-next';
 import { violationTypeFilter, timestampFilter } from '@/utils/filter';
 import ViolationFlowDialog from './flow-dialog.vue';
 import usePermission from '@/hooks/usePermission';
+import { getSopDataBySopNo } from '@/api/sop';
+import SopStepDialog from '../../sop-manage/sop-step/sop-step-dialog.vue';
 const { perm } = usePermission();
 
+const curSopData = ref({});
+const showSopStepDialog = ref(false);
+const curSopType = ref('');
+const editSopFlowHandle = async (sopNo, type = 'fill') => {
+  curSopType.value = type;
+  getSopDataBySopNo(sopNo).then((res) => {
+    if (res?.records?.length) {
+      curSopData.value = res.records[0];
+      showSopStepDialog.value = true;
+    }
+  });
+};
+
 const showViolationFlowDialog = ref(false);
 const curRow = ref({});
 const viewType = ref('');