Quellcode durchsuchen

feat:返工和剔除增加审核流程

lupeng vor 2 Monaten
Ursprung
Commit
f455b41cfc

+ 74 - 12
src/views/quality/reject/components/show.vue

@@ -6,6 +6,7 @@
         <div class="delete">
           <el-button
             style="margin-right: 10px"
+            v-if="tableData.state==='1'"
             type="primary"
             size="small"
             class="btn"
@@ -104,7 +105,16 @@
                           }}
                         </div>
                         <div class="sale-bottom">
-                          <div class="desc">
+                          <div class="desc" v-if="tableData.remark1.signatureUrl">
+                            <div class="img-desc">填表人:</div>
+                            <div class="img-desc"><img :src="tableData.remark1.signatureUrl" style="height: 40px"></div>
+                            <!--                            {{
+                                                          tableData.remark3.user3
+                                                              ? tableData.remark3.user3
+                                                              : "/"
+                                                        }}-->
+                          </div>
+                          <div class="desc" v-if="!tableData.remark1.signatureUrl">
                             填表人:
                             {{
                               tableData.remark1.user1
@@ -120,7 +130,16 @@
                                 : "/"
                             }}
                           </div>
-                          <div class="desc">
+                          <div class="desc" v-if="tableData.remark2.signatureUrl">
+                            <div class="img-desc">检验人员:</div>
+                            <div class="img-desc"><img :src="tableData.remark2.signatureUrl" style="height: 40px"></div>
+                            <!--                            {{
+                                                          tableData.remark3.user3
+                                                              ? tableData.remark3.user3
+                                                              : "/"
+                                                        }}-->
+                          </div>
+                          <div class="desc" v-if="!tableData.remark2.signatureUrl">
                             检验人员:
                             {{
                               tableData.remark2.user2
@@ -140,7 +159,7 @@
                       </div>
                     </td>
                   </tr>
-                  <tr>
+                  <tr v-if="tableData.state=='1'">
                     <td colspan="6">
                       <div class="sale-box">
                         <div class="sale-title">原因分析:</div>
@@ -174,7 +193,7 @@
                           </div>
                         </div>
                         <div class="sale-bottom">
-                          <div class="desc">
+                          <div class="desc" v-if="!tableData.remark3.signatureUrl">
                             分析人:
                             {{
                               tableData.remark3.user3
@@ -182,6 +201,15 @@
                                 : "/"
                             }}
                           </div>
+                          <div class="desc" v-if="tableData.remark3.signatureUrl">
+                            <div class="img-desc">分析人:</div>
+                            <div class="img-desc"><img :src="tableData.remark3.signatureUrl" style="height: 40px"></div>
+<!--                            {{
+                              tableData.remark3.user3
+                                  ? tableData.remark3.user3
+                                  : "/"
+                            }}-->
+                          </div>
                           <div class="desc">
                             日期:
                             {{
@@ -194,7 +222,7 @@
                       </div>
                     </td>
                   </tr>
-                  <tr>
+<!--                  <tr>
                     <td colspan="6">
                       <div class="sale-box">
                         <div class="sale-title">是否有纠正措施:</div>
@@ -290,8 +318,8 @@
                         </div>
                       </div>
                     </td>
-                  </tr>
-                  <tr>
+                  </tr>-->
+                  <tr v-if="tableData.state=='1'">
                     <td colspan="6">
                       <div class="sale-box">
                         <div class="sale-title">采取的措施:</div>
@@ -325,7 +353,16 @@
                           </div>
                         </div>
                         <div class="sale-bottom">
-                          <div class="desc">
+                          <div class="desc" v-if="tableData.remark5.signatureUrl">
+                            <div class="img-desc">责任部门负责人:</div>
+                            <div class="img-desc"><img :src="tableData.remark5.signatureUrl" style="height: 40px"></div>
+                            <!--                            {{
+                                                          tableData.remark3.user3
+                                                              ? tableData.remark3.user3
+                                                              : "/"
+                                                        }}-->
+                          </div>
+                          <div class="desc" v-if="!tableData.remark5.signatureUrl">
                             责任部门负责人:
                             {{
                               tableData.remark5.user5
@@ -345,7 +382,7 @@
                       </div>
                     </td>
                   </tr>
-                  <tr>
+                  <tr v-if="tableData.state=='1'">
                     <td colspan="6">
                       <div class="sale-box">
                         <div class="sale-title">
@@ -359,7 +396,16 @@
                           }}
                         </div>
                         <div class="sale-bottom">
-                          <div class="desc">
+                          <div class="desc" v-if="tableData.remark6.signatureUrl">
+                            <div class="img-desc">签字:</div>
+                            <div class="img-desc"><img :src="tableData.remark6.signatureUrl" style="height: 40px"></div>
+                            <!--                            {{
+                                                          tableData.remark3.user3
+                                                              ? tableData.remark3.user3
+                                                              : "/"
+                                                        }}-->
+                          </div>
+                          <div class="desc" v-if="!tableData.remark6.signatureUrl">
                             签字:{{
                               tableData.remark6.user6
                                 ? tableData.remark6.user6
@@ -378,7 +424,7 @@
                       </div>
                     </td>
                   </tr>
-                  <tr>
+                  <tr v-if="tableData.state=='1'">
                     <td colspan="6">
                       <div class="sale-box">
                         <div class="sale-title">组长(或分管领导)审批意见</div>
@@ -390,7 +436,16 @@
                           }}
                         </div>
                         <div class="sale-bottom">
-                          <div class="desc">
+                          <div class="desc" v-if="tableData.remark7.signatureUrl">
+                            <div class="img-desc">签字:</div>
+                            <div class="img-desc"><img :src="tableData.remark7.signatureUrl" style="height: 40px"></div>
+                            <!--                            {{
+                                                          tableData.remark3.user3
+                                                              ? tableData.remark3.user3
+                                                              : "/"
+                                                        }}-->
+                          </div>
+                          <div class="desc" v-if="!tableData.remark7.signatureUrl">
                             签字:{{
                               tableData.remark7.user7
                                 ? tableData.remark7.user7
@@ -478,6 +533,11 @@ watch(
     margin-right: 20px;
   }
 }
+.img-desc{
+  float: left;
+  height: 40px;
+  line-height: 40px;
+}
 .titlesmall {
   width: 100px;
   text-align: center;
@@ -528,6 +588,8 @@ th {
   }
   .desc {
     margin-right: 20px;
+    height: 40px;
+    line-height: 40px;
   }
 }
 .bgColor {

+ 57 - 9
src/views/quality/reject/index.vue

@@ -19,13 +19,23 @@
     >
       <template #menu="{ row }">
         <el-button
-          v-if="row.state != '2' && row.state != '3'"
-          link
-          @click="toExamine(row)"
+            link
+            icon="el-icon-copy-document"
+            v-if="row.state == '0' || row.state == '2' || row.state == '-1'"
+            @click="openCheckView(row)"
+        >提审</el-button >
+
+        <el-button link v-if="row.state !== '0'" icon="el-icon-copy-document" @click="showFlowSteps(row)"
+        >流程</el-button>
+
+        <el-button
+            link
+            icon="el-icon-copy-document"
+            v-if="row.state == '3'"
+            @click="onCancelFlow(row)"
+        >撤销</el-button
         >
-          处理
-        </el-button>
-        <el-button v-if="row.state == '3'" link @click="toShow(row)">
+        <el-button  link @click="toShow(row)">
           查看
         </el-button>
       </template>
@@ -34,6 +44,11 @@
       <Process :key="proccessKey" @get-list="getList" />
     </div>
     <ShowVue v-model="showState" :tableData="tableData" />
+    <LookFlowStep ref="LookFlowStepRef"></LookFlowStep>
+    <work-flow-check
+        ref="workFlowCheckRef"
+        @sureToSave="onWFSave"
+    ></work-flow-check>
   </div>
 </template>
 <script setup>
@@ -44,6 +59,10 @@ import { useCommonStoreHook, useDictionaryStore } from "@/store";
 import SingleUpload from "@/components/Upload/SingleUpload.vue";
 import Process from "./components/process.vue";
 import ShowVue from "./components/show.vue";
+import WorkFlowCheck from "@/components/WorkFlows/workFlowCheck.vue";
+import LookFlowStep from "@/views/flow/common/LookFlowStep.vue";
+import { cancelFlow,submitFlow } from "@/api/flow";
+import {ref} from "vue";
 const { dicts } = useDictionaryStore();
 const showState = ref(false);
 const toShow = (row) => {
@@ -65,10 +84,35 @@ const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
 const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
 const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
+
+const workFlowCheckRef = ref(null);
+const openCheckView = (row) => {
+  row.businessId = row.id
+  workFlowCheckRef.value && workFlowCheckRef.value.openDialog(row, "removeService");
+};
 onMounted(() => {
   search.value.type = "eliminate";
   dataList();
 });
+
+const onWFSave = (flowForm) => {
+  submitFlow(flowForm).then(() => {
+    ElMessage.success("提交成功");
+    workFlowCheckRef.value && workFlowCheckRef.value.close();
+    dataList();
+  });
+};
+
+const onCancelFlow=(row)=>{
+  cancelFlow(row).then(() => {
+    ElMessage.success("提交成功");
+    dataList();
+  });
+}
+const LookFlowStepRef=ref(null);
+const showFlowSteps = (row) => {
+  LookFlowStepRef.value && LookFlowStepRef.value.openFlowStepDrawer(row.flowIns);
+};
 const getList = () => {
   dataList();
 };
@@ -115,15 +159,19 @@ option.value = Object.assign(option.value, {
         },
         {
           label: "审核中",
-          value: "1",
+          value: "3",
         },
         {
           label: "审核驳回",
-          value: "2",
+          value: "-1",
         },
         {
           label: "审核完成",
-          value: "3",
+          value: "1",
+        },
+        {
+          label: "撤回",
+          value: "2",
         },
       ],
     },

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

@@ -31,12 +31,17 @@
       <template #drawingPath-form="scope">
         <FilesUpload
           v-model="form.drawingPath"
-          v-model:src-list="srcList"
-          v-model:file-name-list="fileNameList"
-          v-model:file-list="fileList"
+          :src-list="srcList"
+          :file-name-list="fileNameList"
           :limit="10"
           @finished="testFiles"
-          :key="uploadKey"
+        />
+      </template>
+      <template #checkName-form="scope">
+        <el-tree-select
+            v-model="form.checkName"
+            :data="userList"
+            filterable
         />
       </template>
     </avue-crud>
@@ -168,9 +173,7 @@ option.value = Object.assign(option.value, {
       label: "检验人",
       prop: "checkName",
       type: "tree",
-      dicData: userList,
-      parent: false,
-      filterable: true,
+      slot: true,
     },
     {
       label: "操作者",

+ 11 - 7
src/views/quality/rework/index.vue

@@ -115,6 +115,7 @@
         :recordId="record.id"
         :dialog="dialog"
         :status="record.state"
+        :flowState="record.flowState"
       />
     </el-dialog>
     <el-dialog
@@ -129,15 +130,14 @@
         :dialog="dialog1"
         :orderCode="record.orderCode"
         :status="record.state"
-        :flowState="record.flowState"
       />
     </el-dialog>
     <ReworkShow v-model="showState" :tableData="tableData" />
     <LookFlowStep ref="LookFlowStepRef"></LookFlowStep>
-    <WorkFlowCheck
+    <work-flow-check
         ref="workFlowCheckRef"
         @sureToSave="onWFSave"
-    ></WorkFlowCheck>
+    ></work-flow-check>
   </div>
 
 </template>
@@ -179,6 +179,10 @@ const dialog1 = ref({
   title: "领料单",
   visible: false,
 });
+const LookFlowStepRef=ref(null);
+const showFlowSteps = (row) => {
+  LookFlowStepRef.value && LookFlowStepRef.value.openFlowStepDrawer(row.flowIns);
+};
 const doEdit = (row, index) => {
   crudRef.value && crudRef.value.rowEdit(row, index);
 };
@@ -353,8 +357,8 @@ option.value = Object.assign(option.value, {
       prop: "created",
       type: "date",
       width: 160,
-      format: "YYYY-MM-DD",
-      valueFormat: "YYYY-MM-DD",
+      format: "YYYY-MM-DD HH:mm:ss",
+      valueFormat: "YYYY-MM-DD HH:mm:ss",
       editDisplay: false,
       overHidden: true,
     },
@@ -368,8 +372,8 @@ option.value = Object.assign(option.value, {
       hide: true,
       startPlaceholder: "开始范围",
       endPlaceholder: "结束范围",
-      format: "YYYY-MM-DD",
-      valueFormat: "YYYY-MM-DD",
+      format: "YYYY-MM-DD HH:mm:ss",
+      valueFormat: "YYYY-MM-DD HH:mm:ss",
       overHidden: true,
       search: true,
     },