Browse Source

通用工艺流程优化

qinhb 2 months ago
parent
commit
3d0f441944

+ 30 - 1
src/views/base/craftManagement/routeCommon/index.vue

@@ -67,9 +67,19 @@
 
         <el-button
             link
+            v-if="row.flowState === '0'"
+            type="primary"
+            icon="el-icon-edit"
+            @click="showEditDialog(row)"
+        >编辑</el-button
+        >
+
+        <el-button
+            link
+            v-if="row.flowState === '0'"
             type="danger"
             icon="el-icon-delete"
-            @click="changeLog(row)"
+            @click="deleteRow(row)"
         >删除</el-button
         >
 
@@ -203,6 +213,10 @@ const changeLog = (row) => {
   console.log(routeDeatil.value);
   dialog1.value.visible = true;
 };
+
+const showEditDialog = (row) =>{
+  crudRef.value && crudRef.value.rowEdit(row);
+}
 /**
  * 上传excel相关
  */
@@ -270,6 +284,7 @@ option.value = Object.assign(option.value, {
   selection: true,
   delBtn: false,
   labelWidth: 130,
+  editBtn: false,
   searchLabelWidth: 110,
   column: [
     {
@@ -330,6 +345,20 @@ option.value = Object.assign(option.value, {
         },
       ],
     },
+    {
+      label: "工艺版本",
+      prop: "processRouteVersion",
+      width: 180,
+      addDisplay: true,
+      rules: [
+        {
+          required: true,
+          message: "工艺版本不能为空",
+          trigger: "blur",
+        },
+      ],
+      overHidden: true,
+    },
     // 在产品那边绑定了工艺路线才是已绑定
     {
       label: "启用状态",

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

@@ -141,7 +141,7 @@ watch(
     <template #footer>
       <div style="flex: auto">
         <el-button @click="close">取消</el-button>
-        <el-button v-if="props.operType == 'todo'" type="primary" @click="toPass">通过{{props.operType}}</el-button>
+        <el-button v-if="props.operType == 'todo'" type="primary" @click="toPass">通过</el-button>
         <el-button v-if="props.operType == 'todo'" type="warning" @click="disAgree">不同意</el-button>
       </div>
     </template>

+ 6 - 4
src/views/flow/common/LookFlowStep.vue

@@ -46,10 +46,12 @@ defineExpose({
             >
               <el-card>
                 <h4><el-text class="mx-1">{{activity.currentStep}}</el-text>
-                  <el-tag v-if="activity.state === '0'" type="info">待审核</el-tag>
-                  <el-tag v-if="activity.state === '1'" type="success">通过</el-tag>
-                  <el-tag v-if="activity.state === '-1'" type="error">驳回</el-tag>
-                  <el-tag v-if="activity.state === '2'" type="error">已撤回</el-tag>
+                  <el-tag v-if="activity.currentType === 'start'" type="success">发起</el-tag>
+                  <el-tag v-if="activity.currentType === 'end'" type="success">结束</el-tag>
+                  <el-tag v-if="activity.currentType === 'audit' && activity.state === '0'" type="info">待审核</el-tag>
+                  <el-tag v-if="activity.currentType === 'audit' && activity.state === '1'" type="success">通过</el-tag>
+                  <el-tag v-if="activity.currentType === 'audit' && activity.state === '-1'" type="error">驳回</el-tag>
+                  <el-tag v-if="activity.currentType === 'audit' && activity.state === '2'" type="error">已撤回</el-tag>
                 </h4>
                 <p>
                   <el-text class="mx-1" v-if="activity.currentStep=='开始'">发起人员:{{activity.auditUser}}</el-text>