ソースを参照

Merge branch 'qingban' of http://139.155.176.112:8091/project-all/mes-admin-temp into qingban

lupeng 3 ヶ月 前
コミット
608c19b364

+ 7 - 0
src/api/process/index.ts

@@ -93,4 +93,11 @@ export function saveOpDetails(queryParams: object) {
     data: queryParams,
   });
 }
+export function queryFormList(queryParams: object) {
+  return request({
+    url: "/api/v1/proRecord/queryForms",
+    method: "post",
+    data: queryParams,
+  });
+}
 

+ 13 - 4
src/views/base/craftManagement/route/bindProcess.vue

@@ -75,7 +75,7 @@
             @node-drag-stop="nodeDragStop"
             @node-drag-start="nodeDragStart"
           >
-            <MiniMap style="background-color: grey" />
+            <MiniMap style="background-color: grey" v-show="!printStauts" />
             <template #edge-custom="props">
               <CustomConnectionLine v-bind="props" />
             </template>
@@ -94,7 +94,11 @@
               <p v-if="isDragOver">拖拽中</p>
             </DropzoneBackground>
 
-            <Panel class="process-panel" position="top-right">
+            <Panel
+              class="process-panel"
+              position="top-right"
+              v-show="!printStauts"
+            >
               <div class="layout-panel">
                 <button title="蛇形排列" @click="convertToSnakeLayout">
                   <PannelIcon name="liucheng" />
@@ -386,13 +390,18 @@ const handleKeydown = () => {
     selectLine.value = null;
   }
 };
-
-const getPng = () => {
+const printStauts = ref(false);
+const getPng = async () => {
   if (!vueFlowRef.value) {
     console.warn("VueFlow element not found");
     return;
   }
+  printStauts.value = true;
+  await nextTick();
   capture(vueFlowRef.value, { shouldDownload: true });
+  setTimeout(() => {
+    printStauts.value = false;
+  }, 0);
 };
 const nodeType = ref("custom");
 const editStatus = ref(false);

+ 60 - 1
src/views/quality/handover/index.vue

@@ -120,6 +120,17 @@
             <el-input v-model="scope.row.remark"></el-input>
           </template>
         </el-table-column>
+<!--        <el-table-column prop="remark" label="关联表单" width="120">
+          <template  #default="scope">
+            <el-button
+                icon="el-icon-setting"
+                text
+                @click="formList(scope.row)"
+                type="primary"
+                size="small"
+            >表单列表</el-button>
+          </template>
+        </el-table-column>-->
       </el-table>
 
       <div
@@ -131,15 +142,41 @@
         <el-button type="primary" @click="handleExport" v-if="itemList.value !== 0">导 出</el-button>
       </div>
     </el-dialog>
+
+    <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 }}-{{item.formCode}}({{item.seqs}})</el-card
+      >
+    </el-dialog>
+    <el-dialog
+        v-model="excelShow"
+        title="详情"
+        @close="excelShow = false"
+        width="1600"
+        destroy-on-close
+    >
+      <ExcelDataBbox :data="ExDataObj" @close="excelShow = false" />
+    </el-dialog>
   </div>
 </template>
 <script setup>
 import { ref, getCurrentInstance } from "vue";
 import { useCrud } from "@/hooks/userCrud";
-import { exportOperationRecord ,addProRecord,queryProductHandover,updateHandoverList} from "@/api/process";
+import { exportOperationRecord ,queryFormList,queryProductHandover,updateHandoverList} from "@/api/process";
 import { useCommonStoreHook } from "@/store";
 import dictDataUtil from "@/common/configs/dictDataUtil";
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+import ExcelDataBbox from "@/views/base/apply/excelDataBbox.vue";
 const test = () => {
   isShowTable.value = true;
   tableType.value = tableType.value == 1 ? 2 : 1;
@@ -206,6 +243,22 @@ const openDialog = (type, row) => {
     dialog.type = type;
   });
 };
+const dialog8 = reactive({
+  title: "表单列表",
+  visible: false,
+});
+const showProList = ref([]);
+const formList = (row) => {
+  queryFormList({...search.value,workOrderId: row.workOrderId,operationId: row.operationId}).then((data)=>{
+    if(data.data.length > 0){
+      showProList.value = data.data;
+      dialog8.visible = true;
+    }else{
+      ElMessage.error("未关联到表单");
+    }
+  })
+
+};
 const saveItemList = () => {
   updateHandoverList(itemList.value).then((data) => {
     if (data.code === "200") {
@@ -267,6 +320,12 @@ option.value = Object.assign(option.value, {
     },
   ],
 });
+const excelShow = ref(false);
+const ExDataObj = ref({});
+const toShowExcel = (item) => {
+  ExDataObj.value = item;
+  excelShow.value = true;
+};
 const handleExport = () => {
   if(data.value.length !== 0){
     exportOperationRecord({...search.value,operationType: clickOperationType.value,type: 0}).then((response) => {

+ 63 - 7
src/views/quality/opRecord/index.vue

@@ -65,17 +65,17 @@
             <el-date-picker value-format="YYYY-MM-DD" type="date" v-model="scope.row.reDate"></el-date-picker>
           </template>
         </el-table-column>
-        <el-table-column prop="reNum" label="接收数量" width="60">
+        <el-table-column prop="reNum" label="接收数量" width="80">
           <template v-if="dialog.type === 1" #default="scope">
             <el-input v-model="scope.row.reNum"></el-input>
           </template>
         </el-table-column>
-        <el-table-column prop="next0Num" label="合格品数" width="60">
+        <el-table-column prop="next0Num" label="合格品数" width="80">
           <template v-if="dialog.type === 1" #default="scope">
             <el-input v-model="scope.row.next0Num"></el-input>
           </template>
         </el-table-column>
-        <el-table-column prop="next1Num" label="不合格品数" width="60">
+        <el-table-column prop="next1Num" label="不合格品数" width="80">
           <template v-if="dialog.type === 1"  #default="scope">
             <el-input v-model="scope.row.next1Num"></el-input>
           </template>
@@ -90,7 +90,7 @@
             <el-input v-model="scope.row.useDevice"></el-input>
           </template>
         </el-table-column>
-        <el-table-column prop="craftCondition" label="工艺条件" width="140">
+        <el-table-column prop="craftCondition" label="工艺条件" width="160">
           <template v-if="dialog.type === 1"  #default="scope">
             <el-input v-model="scope.row.craftCondition"></el-input>
           </template>
@@ -111,11 +111,20 @@
             <el-input v-model="scope.row.remark"></el-input>
           </template>
         </el-table-column>
-        <el-table-column prop="none" label="H级记录表" width="100">
-          <template  #default="scope">
+        <el-table-column prop="none" label="关联表单">
+<!--          <template  #default="scope">
             <el-button v-if="scope.row.type == 1" @click="clickH(scope.row)" type="primary" link>
               工作记录表
             </el-button>
+          </template>-->
+          <template  #default="scope">
+            <el-button
+                icon="el-icon-setting"
+                text
+                @click="formList(scope.row)"
+                type="primary"
+                size="small"
+            >表单列表</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -315,15 +324,41 @@
         <el-button type="primary" @click="handleExport1">导 出</el-button>
       </div>
     </el-dialog>
+
+    <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 }}-{{item.formCode}}({{item.seqs}})</el-card
+      >
+    </el-dialog>
+    <el-dialog
+        v-model="excelShow"
+        title="详情"
+        @close="excelShow = false"
+        width="1600"
+        destroy-on-close
+    >
+      <ExcelDataBbox :data="ExDataObj" @close="excelShow = false" />
+    </el-dialog>
   </div>
 </template>
 <script setup>
 import { ref, getCurrentInstance } from "vue";
 import { useCrud } from "@/hooks/userCrud";
-import { exportOperationRecord,exportOperationRecord1 ,addProRecord,queryProductHandover,updateHandoverList,queryHInfo,saveOpDetails} from "@/api/process";
+import { exportOperationRecord,exportOperationRecord1 ,queryFormList,addProRecord,queryProductHandover,updateHandoverList,queryHInfo,saveOpDetails} from "@/api/process";
 import { useCommonStoreHook } from "@/store";
 import dictDataUtil from "@/common/configs/dictDataUtil";
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
+import ExcelDataBbox from "@/views/base/apply/excelDataBbox.vue";
 const test = () => {
   isShowTable.value = true;
   tableType.value = tableType.value == 1 ? 2 : 1;
@@ -350,7 +385,28 @@ const dialog1 = reactive({
   title: "工作记录",
   visible: false,
 });
+const dialog8 = reactive({
+  title: "表单列表",
+  visible: false,
+});
+const showProList = ref([]);
+const formList = (row) => {
+  queryFormList({...search.value,workOrderId: row.workOrderId,operationId: row.operationId}).then((data)=>{
+    if(data.data.length > 0){
+      showProList.value = data.data;
+      dialog8.visible = true;
+    }else{
+      ElMessage.error("未关联到表单");
+    }
+  })
 
+};
+const excelShow = ref(false);
+const ExDataObj = ref({});
+const toShowExcel = (item) => {
+  ExDataObj.value = item;
+  excelShow.value = true;
+};
 const createRowSave = (row,done,loading) =>{
   form.value.type = "1"
   addProRecord(form.value).then((data) =>{