Ver código fonte

Merge remote-tracking branch 'origin/qingban' into qingban

liziliang 3 meses atrás
pai
commit
a474af29f6

+ 12 - 0
src/api/craft/opExcel/index.ts

@@ -0,0 +1,12 @@
+import request from "@/utils/request";
+
+// 返回一工段为
+export function opExcelPage(operationId) {
+  return request({
+    url: "/api/v1/opExcelForm/page",
+    method: "post",
+    data: {
+      operationId: operationId,
+    },
+  });
+}

+ 2 - 1
src/store/modules/dictionary.ts

@@ -34,11 +34,12 @@ export const useDictionaryStore = defineStore("dictionaryStore", () => {
     "process_state",
     "form_params",
     "bill_type",
-      "flow_ins_state",
+    "flow_ins_state",
     "warehouse_type",
     "signature_type",
     "signature_attribution",
     "accessories_property",
+    "system_message_type",
   ];
   const dicts = ref<{ [key: string]: any[] }>({});
 

+ 11 - 1
src/views/base/craftManagement/route/components/processComponent.vue

@@ -165,6 +165,8 @@ import {
   processesByRouteId,
   saveProcessInRoute,
 } from "@/api/craft/route/index";
+
+import { opExcelPage } from "@/api/craft/opExcel";
 const prodtCode = ref("");
 const routerId = ref("");
 const router = useRouter();
@@ -378,7 +380,15 @@ const onUpdate = () => {
   selectIndex.value = -1;
 };
 
-const clickDelete = (index) => {
+const clickDelete = async (index) => {
+  if (selectProComs.value[index].compentType === "operationExcel") {
+    let operationId = route.fullPath.split("/")[4];
+    let res = await opExcelPage(operationId);
+    if (res.data.totalCount > 0) {
+      ElMessage.error("请先删除工序表单数据!");
+      return;
+    }
+  }
   selectProComs.value.splice(index, 1);
   selectIndex.value = -1;
   isChanged.value = true;

+ 4 - 11
src/views/system/message/index.vue

@@ -129,6 +129,8 @@ import { addMessage, updateMessage } from "@/api/system/message";
 import { useCommonStoreHook } from "@/store";
 import { getUserList } from "@/api/system/user";
 import { queryDictDataByType } from "@/api/system/dict";
+import { useDictionaryStore } from "@/store";
+const { dicts } = useDictionaryStore();
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
 const userFormRef = ref(ElForm); // 用户表单
 const message = ref({
@@ -279,10 +281,8 @@ option.value = Object.assign(option.value, {
       overHidden: true,
       type: "select",
       width: 150,
-      dicData: [
-        { label: "系统消息", value: "0" },
-        { label: "用户消息", value: "1" },
-      ],
+      dicData: dicts.system_message_type,
+      props: { label: "dictLabel", value: "dictValue" },
       rules: [
         {
           required: true,
@@ -291,13 +291,6 @@ option.value = Object.assign(option.value, {
         },
       ],
       html: true,
-      formatter: (val) => {
-        if (val.type === "0") {
-          return '<b class="el-tag el-tag--danger el-tag--light">系统消息</b>';
-        } else if (val.type === "1") {
-          return '<b class="el-tag el-tag--success el-tag--light">用户消息</b>';
-        }
-      },
     },
     {
       label: "状态",