Bläddra i källkod

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

dengyu 4 månader sedan
förälder
incheckning
09d5e59237

+ 14 - 4
src/views/base/craftManagement/route/components/configs.ts

@@ -381,31 +381,37 @@ export const getTableConfig = (id: string) => {
 interface comType {
   compentName: string;
   compentType: string;
+  index: number;
 }
 export const comTypes: comType[] = [
   {
     compentName: "记录项",
     compentType: "jiluxiang",
+    index: 12,
   },
   {
     compentName: "物料采集",
     compentType: "wuliaocaiji",
+    index: 0,
   },
-  {
-    compentName: "辅料采集",
-    compentType: "fuliaoCJ",
-  },
+  // {
+  //   compentName: "辅料采集",
+  //   compentType: "fuliaoCJ",
+  // },
   {
     compentName: "ESOP",
     compentType: "ESOP",
+    index: 24,
   },
   {
     compentName: "点检",
     compentType: "dianjian",
+    index: 9,
   },
   {
     compentName: "设备记录",
     compentType: "shebeijilu",
+    index: 3,
   },
   // {
   //   compentName: "紧固",
@@ -422,14 +428,17 @@ export const comTypes: comType[] = [
   {
     compentName: "多媒体采集",
     compentType: "duomeiticaiji",
+    index: 21,
   },
   {
     compentName: "工序表单",
     compentType: "operationExcel",
+    index: 15,
   },
   {
     compentName: "设备数据",
     compentType: "ceshishuju",
+    index: 6,
   },
   // {
   //   compentName: "数据采集",
@@ -438,5 +447,6 @@ export const comTypes: comType[] = [
   {
     compentName: "工序文件",
     compentType: "gongxuwenjian",
+    index: 18,
   },
 ];

+ 25 - 0
src/views/base/craftManagement/route/components/processComponent.vue

@@ -44,6 +44,7 @@
       <VueDraggable
         v-model="selectProComs"
         :animation="150"
+        :draggable="false"
         ghostClass="ghost"
         @update="onUpdate"
         style="display: flex"
@@ -68,6 +69,15 @@
       </div>
       <div v-else-if="tipTitle !== '编辑工序表单'">
         <div class="tipTitle">{{ tipTitle }}</div>
+        <el-tabs
+          v-if="currentCom.compentType === 'wuliaocaiji'"
+          v-model="materialType"
+          type="card"
+          @tab-change="materialTypeChange"
+        >
+          <el-tab-pane label="主料" name="1" />
+          <el-tab-pane label="辅料" name="2" />
+        </el-tabs>
         <el-button
           type="primary"
           @click="creatNewData"
@@ -129,6 +139,10 @@ const back = () => {
 };
 
 const save = async () => {
+  selectProComs.value = selectProComs.value.sort((a, b) => {
+    return a.index - b.index;
+  });
+
   for (let i = 0; i < selectProComs.value.length; i++) {
     selectProComs.value[i].operationId = route.fullPath.split("/")[4];
     selectProComs.value[i].sortNum = i;
@@ -230,6 +244,17 @@ const getTipContent = (itemValue) => {
 
   return "请先选择组件";
 };
+
+// 无聊采集组件 主料和辅料
+const materialType = ref("1");
+const materialTypeChange = (val) => {
+  materialType.value = val;
+  if (val === "1") {
+    tableType.value = "wuliaocaiji";
+  } else {
+    tableType.value = "fuliaoCJ";
+  }
+};
 </script>
 
 <style lang="scss" scoped>