Browse Source

fix:替换,剔除,返工

lupeng 2 months ago
parent
commit
0b140c4a30

+ 26 - 0
src/api/fault/index.ts

@@ -75,6 +75,32 @@ export function handleReworkRecord(data: Object) {
  * @param id
  * @param data
  */
+export function reworkRecord(id: String) {
+  return request({
+    url: `/api/v1/rework/record/get/${id}`,
+    method: "get",
+  });
+}
+
+/**
+ * 处理结果
+ *
+ * @param id
+ * @param data
+ */
+export function removeRecord(id: String) {
+  return request({
+    url: `/api/v1/error/get/${id}`,
+    method: "get",
+  });
+}
+
+/**
+ * 处理结果
+ *
+ * @param id
+ * @param data
+ */
 export function getReworkItem(data: Object) {
   return request({
     url: "/api/v1/rework/item/list",

+ 20 - 4
src/views/base/apply/apply.vue

@@ -143,7 +143,14 @@ const dialog8 = reactive({
 // 流程定义的列表
 const flowDataList = ref([]);
 const getFlowList = () => {
-  queryFlowDataList({ flowType: flowForm.flow_type }).then((res) => {
+  flowForm.flowType = "workFormService"
+  if(props.rowData.formType==='17'){
+    flowForm.flowType = "filterSheetService"
+  }
+  if(props.rowData.formType==='18'){
+    flowForm.flowType = "filterHSheetService"
+  }
+  queryFlowDataList({ flowType: flowForm.flowType }).then((res) => {
     flowDataList.value = res.data;
   });
 };
@@ -157,7 +164,7 @@ const showProExcel = async (id) => {
 const flowFormRef = ref();
 const flowForm = reactive({
   businessId: "",
-  flow_type: "workFormService",
+  flowType: "workFormService",
   definitionId: "",
   users: "",
 });
@@ -180,6 +187,12 @@ const whenSelectFlow = () => {
 const sureToSave = () => {
   flowForm.businessId=props.rowData.id;
   flowForm.flowType = "workFormService"
+  if(props.rowData.formType==='17'){
+    flowForm.flowType = "filterSheetService"
+  }
+  if(props.rowData.formType==='18'){
+    flowForm.flowType = "filterHSheetService"
+  }
   submitFlow(flowForm).then(() => {
     ElMessage.success("提交成功");
     emits("close");
@@ -213,8 +226,11 @@ const userList = ref([]);
 const submitList = ref([]);
 const LogList = ref([]);
 const getlogList = async () => {
-  const { data } = await logList(props.rowData.flowIns);
-  LogList.value = data;
+  if(props.rowData.flowIns){
+    const { data } = await logList(props.rowData.flowIns);
+    LogList.value = data;
+  }
+
 };
 const submit = async () => {
   const promiseArray = ref([]);

+ 13 - 1
src/views/flow/common/CheckFlow.vue

@@ -12,11 +12,23 @@ import {
 import RouteFlowComService from "@/views/flow/common/CheckTopInfos/routeFlowComService.vue";
 import RouteFlowService from "@/views/flow/common/CheckTopInfos/routeFlowService.vue";
 import SeqInFlowService from "@/views/flow/common/CheckTopInfos/seqInFlowService.vue";
+import WorkFormService from "@/views/flow/common/CheckTopInfos/workFormService.vue";
+import FilterSheetService from "@/views/flow/common/CheckTopInfos/filterSheetService.vue";
+import FilterHSheetService from "@/views/flow/common/CheckTopInfos/filterHSheetService.vue";
+import ReworkService from "@/views/flow/common/CheckTopInfos/reworkService.vue";
+import RemoveService from "@/views/flow/common/CheckTopInfos/removeService.vue";
 
 const allComponents = shallowReactive({
   RouteFlowComService,
   RouteFlowService,
-  SeqInFlowService
+  SeqInFlowService,
+  WorkFormService,
+  FilterSheetService,
+  FilterHSheetService,
+  ReworkService,
+  RemoveService,
+
+
 });
 const dialogVisible = ref(false);
 const componentName = ref("");

+ 85 - 0
src/views/flow/common/CheckTopInfos/filterHSheetService.vue

@@ -0,0 +1,85 @@
+<script setup lang="ts">
+import { getSeqInInfo } from "@/views/flow/common/CheckTopInfos/utils";
+import { useCommonStoreHook, useDictionaryStore } from "@/store";
+import { useScreenshot } from "@/views/base/craftManagement/route/screenshot";
+import { useLayout } from "@/hooks/useLayout";
+import {getExcelData} from "@/api/apply";
+import ExcelDataBbox from "@/views/base/apply/excelDataBbox.vue";
+
+
+
+const props = defineProps({
+  row: {
+    type: Object,
+    required: true,
+  },
+});
+const dialog8 = reactive({
+  title: "表单列表",
+  visible: false,
+});
+
+onMounted(async () => {
+
+});
+const showProList = ref([]);
+const showProExcel = async (id) => {
+  const { data, code } = await getExcelData(id);
+  showProList.value = data;
+  dialog8.visible = true;
+};
+const excelShow = ref(false);
+const ExDataObj = ref({});
+const toShowExcel = (item) => {
+  ExDataObj.value = item;
+  excelShow.value = true;
+};
+const { capture } = useScreenshot();
+const { layout } = useLayout();
+const { dicts } = useDictionaryStore();
+</script>
+
+<template>
+  <div class="box">
+
+    <el-button
+        type="success"
+        style="margin-bottom: 10px"
+        @click="showProExcel(props.row.businessId)"
+    >查看表格数据</el-button
+    >
+  </div>
+  <el-dialog
+      v-model="dialog8.visible"
+      :title="dialog8.title"
+      width="950px"
+      @close="dialog8.visible = false"
+  >
+    <el-card
+        style="cursor: pointer; font-size: 20px"
+        shadow="always"
+        :key="index"
+        @click="toShowExcel(item)"
+        v-for="(item, index) in showProList"
+    >{{ item.formName }}</el-card
+    >
+  </el-dialog>
+
+  <el-dialog
+      v-model="excelShow"
+      title="详情"
+      @close="excelShow = false"
+      append-to-body
+      fullscreen
+      destroy-on-close
+  >
+    <ExcelDataBbox :data="ExDataObj" @close="excelShow = false" />
+  </el-dialog>
+</template>
+
+<style>
+.cell-item {
+  display: flex;
+  align-items: center;
+}
+</style>

+ 85 - 0
src/views/flow/common/CheckTopInfos/filterSheetService.vue

@@ -0,0 +1,85 @@
+<script setup lang="ts">
+import { getSeqInInfo } from "@/views/flow/common/CheckTopInfos/utils";
+import { useCommonStoreHook, useDictionaryStore } from "@/store";
+import { useScreenshot } from "@/views/base/craftManagement/route/screenshot";
+import { useLayout } from "@/hooks/useLayout";
+import {getExcelData} from "@/api/apply";
+import ExcelDataBbox from "@/views/base/apply/excelDataBbox.vue";
+
+
+
+const props = defineProps({
+  row: {
+    type: Object,
+    required: true,
+  },
+});
+const dialog8 = reactive({
+  title: "表单列表",
+  visible: false,
+});
+
+onMounted(async () => {
+
+});
+const showProList = ref([]);
+const showProExcel = async (id) => {
+  const { data, code } = await getExcelData(id);
+  showProList.value = data;
+  dialog8.visible = true;
+};
+const excelShow = ref(false);
+const ExDataObj = ref({});
+const toShowExcel = (item) => {
+  ExDataObj.value = item;
+  excelShow.value = true;
+};
+const { capture } = useScreenshot();
+const { layout } = useLayout();
+const { dicts } = useDictionaryStore();
+</script>
+
+<template>
+  <div class="box">
+
+    <el-button
+        type="success"
+        style="margin-bottom: 10px"
+        @click="showProExcel(props.row.businessId)"
+    >查看表格数据</el-button
+    >
+  </div>
+  <el-dialog
+      v-model="dialog8.visible"
+      :title="dialog8.title"
+      width="950px"
+      @close="dialog8.visible = false"
+  >
+    <el-card
+        style="cursor: pointer; font-size: 20px"
+        shadow="always"
+        :key="index"
+        @click="toShowExcel(item)"
+        v-for="(item, index) in showProList"
+    >{{ item.formName }}</el-card
+    >
+  </el-dialog>
+
+  <el-dialog
+      v-model="excelShow"
+      title="详情"
+      @close="excelShow = false"
+      append-to-body
+      fullscreen
+      destroy-on-close
+  >
+    <ExcelDataBbox :data="ExDataObj" @close="excelShow = false" />
+  </el-dialog>
+</template>
+
+<style>
+.cell-item {
+  display: flex;
+  align-items: center;
+}
+</style>

+ 152 - 0
src/views/flow/common/CheckTopInfos/removeService.vue

@@ -0,0 +1,152 @@
+<script setup lang="ts">
+
+import { removeRecord} from "@/api/fault";
+import ShowVue from "@/views/quality/reject/components/show.vue";
+
+
+
+const props = defineProps({
+  row: {
+    type: Object,
+    required: true,
+  },
+});
+const row=ref(null);
+onMounted(async () => {
+  removeRecord(props.row.businessId).then(
+       (data)=>{
+         row.value=data.data;
+       }
+   );
+});
+const tableData=ref();
+const showState=ref(false);
+const toShow = () => {
+  tableData.value = setJson(row.value);
+  showState.value = true;
+};
+const setJson = (row1) => {
+  const row = JSON.parse(JSON.stringify(row1));
+  //处理初始值
+  let obj = {
+    content: "",
+    user1: "",
+    user2: "",
+    user3: "",
+    user4: "",
+    user5: "",
+    user6: "",
+    user7: "",
+    time: "",
+    state: "-1",
+  };
+  if (row.remark1 == "") {
+    row.remark1 = JSON.parse(JSON.stringify(obj));
+  } else {
+    if (Object.keys(JSON.parse(row.remark1)).length == 0) {
+      row.remark1 = JSON.parse(JSON.stringify(obj));
+    } else {
+      row.remark1 = {
+        ...JSON.parse(JSON.stringify(obj)),
+        ...JSON.parse(row.remark1),
+      };
+    }
+  }
+  if (row.remark2 == "") {
+    row.remark2 = JSON.parse(JSON.stringify(obj));
+  } else {
+    if (Object.keys(JSON.parse(row.remark2)).length == 0) {
+      row.remark2 = JSON.parse(JSON.stringify(obj));
+    } else {
+      row.remark2 = {
+        ...JSON.parse(JSON.stringify(obj)),
+        ...JSON.parse(row.remark2),
+      };
+    }
+  }
+  if (row.remark3 == "") {
+    row.remark3 = JSON.parse(JSON.stringify(obj));
+  } else {
+    if (Object.keys(JSON.parse(row.remark3)).length == 0) {
+      row.remark3 = JSON.parse(JSON.stringify(obj));
+    } else {
+      row.remark3 = {
+        ...JSON.parse(JSON.stringify(obj)),
+        ...JSON.parse(row.remark3),
+      };
+    }
+  }
+  if (row.remark4 == "") {
+    row.remark4 = JSON.parse(JSON.stringify(obj));
+  } else {
+    if (Object.keys(JSON.parse(row.remark4)).length == 0) {
+      row.remark4 = JSON.parse(JSON.stringify(obj));
+    } else {
+      row.remark4 = {
+        ...JSON.parse(JSON.stringify(obj)),
+        ...JSON.parse(row.remark4),
+      };
+    }
+  }
+  if (row.remark5 == "") {
+    row.remark5 = JSON.parse(JSON.stringify(obj));
+  } else {
+    if (Object.keys(JSON.parse(row.remark5)).length == 0) {
+      row.remark5 = JSON.parse(JSON.stringify(obj));
+    } else {
+      row.remark5 = {
+        ...JSON.parse(JSON.stringify(obj)),
+        ...JSON.parse(row.remark5),
+      };
+    }
+  }
+  if (row.remark6 == "") {
+    row.remark6 = JSON.parse(JSON.stringify(obj));
+  } else {
+    if (Object.keys(JSON.parse(row.remark6)).length == 0) {
+      row.remark6 = JSON.parse(JSON.stringify(obj));
+    } else {
+      row.remark6 = {
+        ...JSON.parse(JSON.stringify(obj)),
+        ...JSON.parse(row.remark6),
+      };
+    }
+  }
+  if (row.remark7 == "") {
+    row.remark7 = JSON.parse(JSON.stringify(obj));
+  } else {
+    if (Object.keys(JSON.parse(row.remark7)).length == 0) {
+      row.remark7 = JSON.parse(JSON.stringify(obj));
+    } else {
+      row.remark7 = {
+        ...JSON.parse(JSON.stringify(obj)),
+        ...JSON.parse(row.remark7),
+      };
+    }
+  }
+  return row;
+};
+
+
+</script>
+
+<template>
+  <div class="box">
+
+    <el-button
+        type="success"
+        style="margin-bottom: 10px"
+        @click="toShow()"
+    >查看剔除信息</el-button
+    >
+  </div>
+  <ShowVue v-model="showState" :tableData="tableData" />
+
+</template>
+
+<style>
+.cell-item {
+  display: flex;
+  align-items: center;
+}
+</style>

+ 65 - 0
src/views/flow/common/CheckTopInfos/reworkService.vue

@@ -0,0 +1,65 @@
+<script setup lang="ts">
+
+import {getReworkItem, reworkRecord} from "@/api/fault";
+import ReworkShow from "@/views/quality/rework/components/rework-show.vue";
+
+
+
+const props = defineProps({
+  row: {
+    type: Object,
+    required: true,
+  },
+});
+
+const rework=ref(null);
+onMounted(async () => {
+   reworkRecord(props.row.businessId).then(
+       (data)=>{
+         rework.value=data.data;
+       }
+   );
+});
+const tableData=ref({});
+const reworkItem=ref({});
+const showState=ref(false);
+const showTable = () => {
+  reworkItem.value.recordId = props.row.businessId;
+  getReworkItem(reworkItem.value).then((data) => {
+    if (data.code === "200") {
+      tableData.value = rework.value;
+      tableData.value.itemList = data.data;
+      showState.value = true;
+    } else {
+      ElMessage({
+        message: data.msg,
+        type: "error",
+      });
+    }
+  });
+};
+
+
+
+</script>
+
+<template>
+  <div class="box">
+
+    <el-button
+        type="success"
+        style="margin-bottom: 10px"
+        @click="showTable()"
+    >查看返工记录卡</el-button
+    >
+  </div>
+  <ReworkShow v-model="showState" :tableData="tableData" />
+
+</template>
+
+<style>
+.cell-item {
+  display: flex;
+  align-items: center;
+}
+</style>

+ 19 - 3
src/views/flow/common/CheckTopInfos/utils/index.ts

@@ -1,4 +1,5 @@
 import request from "@/utils/request";
+import FilterSheetService from "@/views/flow/common/CheckTopInfos/filterSheetService.vue";
 
 // 获取基础工艺路线详情
 export function getRouteInfo(id: string) {
@@ -17,18 +18,33 @@ export function getSeqInInfo(id: string) {
 export class DrawerTitleClass {
   static routeFlowComService = "工艺流程审核";
   static routeFlowService = "产品工艺流程审核";
-  static seqInFlowService = "成品入库审核流程"
+  static seqInFlowService = "成品入库审核流程";
+  static workFormService = "生产随工单审核流程";
+  static filterSheetService = "普通筛选单审核流程";
+  static filterHSheetService = "H级筛选单审核流程";
+  static reworkService = "返工记录卡审核流程";
+  static removeService = "剔除审核流程";
+  static removeService = "剔除审核流程";
 }
 
 export class TopTitleClass {
   static routeFlowComService = "工艺信息";
   static routeFlowService = "产品工艺信息";
-  static seqInFlowService = "成品入库"
+  static seqInFlowService = "成品入库";
+  static filterSheetService = "普通筛选单";
+  static filterHSheetService = "H级筛选单";
+  static removeService = "剔除";
+  static reworkService = "返工记录卡";
 }
 
 export class ComponentNameClass {
   static routeFlowComService = "RouteFlowComService";
   static routeFlowService = "RouteFlowService";
-  static seqInFlowService = "SeqInFlowService"
+  static seqInFlowService = "SeqInFlowService";
+  static workFormService = "WorkFormService";
+  static filterSheetService = "FilterSheetService";
+  static filterHSheetService = "FilterHSheetService";
+  static removeService = "RemoveService";
+  static reworkService = "ReworkService";
 }
 

+ 85 - 0
src/views/flow/common/CheckTopInfos/workFormService.vue

@@ -0,0 +1,85 @@
+<script setup lang="ts">
+import { getSeqInInfo } from "@/views/flow/common/CheckTopInfos/utils";
+import { useCommonStoreHook, useDictionaryStore } from "@/store";
+import { useScreenshot } from "@/views/base/craftManagement/route/screenshot";
+import { useLayout } from "@/hooks/useLayout";
+import {getExcelData} from "@/api/apply";
+import ExcelDataBbox from "@/views/base/apply/excelDataBbox.vue";
+
+
+
+const props = defineProps({
+  row: {
+    type: Object,
+    required: true,
+  },
+});
+const dialog8 = reactive({
+  title: "表单列表",
+  visible: false,
+});
+
+onMounted(async () => {
+
+});
+const showProList = ref([]);
+const showProExcel = async (id) => {
+  const { data, code } = await getExcelData(id);
+  showProList.value = data;
+  dialog8.visible = true;
+};
+const excelShow = ref(false);
+const ExDataObj = ref({});
+const toShowExcel = (item) => {
+  ExDataObj.value = item;
+  excelShow.value = true;
+};
+const { capture } = useScreenshot();
+const { layout } = useLayout();
+const { dicts } = useDictionaryStore();
+</script>
+
+<template>
+  <div class="box">
+
+    <el-button
+        type="success"
+        style="margin-bottom: 10px"
+        @click="showProExcel(props.row.businessId)"
+    >查看表格数据</el-button
+    >
+  </div>
+  <el-dialog
+      v-model="dialog8.visible"
+      :title="dialog8.title"
+      width="950px"
+      @close="dialog8.visible = false"
+  >
+    <el-card
+        style="cursor: pointer; font-size: 20px"
+        shadow="always"
+        :key="index"
+        @click="toShowExcel(item)"
+        v-for="(item, index) in showProList"
+    >{{ item.formName }}</el-card
+    >
+  </el-dialog>
+
+  <el-dialog
+      v-model="excelShow"
+      title="详情"
+      @close="excelShow = false"
+      append-to-body
+      fullscreen
+      destroy-on-close
+  >
+    <ExcelDataBbox :data="ExDataObj" @close="excelShow = false" />
+  </el-dialog>
+</template>
+
+<style>
+.cell-item {
+  display: flex;
+  align-items: center;
+}
+</style>

+ 10 - 4
src/views/quality/rework/components/rework-detail.vue

@@ -37,13 +37,13 @@
           @finished="testFiles"
         />
       </template>
-      <template #checkName-form="scope">
+<!--      <template #checkName-form="scope">
         <el-tree-select
             v-model="form.checkName"
             :data="userList"
             filterable
         />
-      </template>
+      </template>-->
     </avue-crud>
   </div>
 </template>
@@ -56,6 +56,7 @@ import SingleUpload from "@/components/Upload/SingleUpload.vue";
 import {getUserList, getUserTree} from "@/api/system/user";
 import { ref } from "vue";
 import FilesUpload from "@/components/Upload/FilesUpload.vue";
+import {signatureList} from "@/api/signature";
 
 // 数据字典相关
 const { dicts } = useDictionaryStore();
@@ -113,7 +114,7 @@ const testFiles = () => {
 onMounted(() => {
   search.value.recordId = props.recordId;
   dataList();
-  getUserTree().then((data) => {
+    signatureList({signatureType:"3"}).then((data) => {
     userList.value = data.data;
   });
 });
@@ -173,7 +174,12 @@ option.value = Object.assign(option.value, {
       label: "检验人",
       prop: "checkName",
       type: "tree",
-      slot: true,
+      dicData: userList,
+        props: {
+            label: 'signatureName',
+            value: 'id'
+        },
+
     },
     {
       label: "操作者",

+ 6 - 1
src/views/quality/rework/components/rework-show.vue

@@ -41,6 +41,7 @@
                 </div>
               </div>
               <table style="border-collapse: collapse; border-bottom: 0">
+                <tbody>
                 <tr>
                   <td class="detail-title" rowspan="2">需返工内容</td>
                   <td class="title-one-height title-one-width title-size">
@@ -64,8 +65,10 @@
                     {{ tableData.reason }}
                   </td>
                 </tr>
+                </tbody>
               </table>
               <table>
+                <tbody>
                 <tr>
                   <td
                     class="detail-title"
@@ -100,8 +103,10 @@
                   <td class="title-size">{{ item.qualifiedRate }}</td>
                   <td class="title-size">{{ item.operateName }}</td>
                   <td class="title-size">{{ item.operateDate }}</td>
-                  <td class="title-size">{{ item.checkName }}</td>
+                  <td class="title-size" v-if="!item.signatureUrl">{{ item.checkName }}</td>
+                  <td class="title-size" v-if="item.signatureUrl" ><img :src="item.signatureUrl" style="height: 30px"></td>
                 </tr>
+                </tbody>
               </table>
             </div>
           </div>