浏览代码

bug解决

cz 2 年之前
父节点
当前提交
24bcb9600d
共有 2 个文件被更改,包括 34 次插入11 次删除
  1. 23 10
      src/views/MES/workOrder/add.vue
  2. 11 1
      src/views/MES/workOrder/index.vue

+ 23 - 10
src/views/MES/workOrder/add.vue

@@ -87,17 +87,30 @@ const formData = ref({
 });
 
 const getDict = () => {
-  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
-    columns.value = res.data.rows.map((item, index) => {
-      return {
-        text: "ceshi来源" + index,
-        value: index * 10,
-      };
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      tenantId: "@福建宏星!#¥%……&*()",
+      dictCode: "work_order_source",
+    })
+    .then((res) => {
+      columns.value = res.data.rows.map((item, index) => {
+        return {
+          text: item.dictValue,
+          value: item.dictKey,
+        };
+      });
     });
-    // formData.value.warehouseName = formData.value.warehouseId
-    //   ? columns.value.find((item) => item.value == formData.value.warehouseId).name
-    //   : null;
-  });
+  // proxy.post("/warehouse/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
+  //   columns.value = res.data.rows.map((item, index) => {
+  //     return {
+  //       text: "ceshi来源" + index,
+  //       value: index * 10,
+  //     };
+  //   });
+
+  // });
 
   proxy
     .post("/productInfo/page", { pageNum: 1, pageSize: 9999, definition: "1" })

+ 11 - 1
src/views/MES/workOrder/index.vue

@@ -68,7 +68,7 @@ const listConfig = ref([
   },
   {
     label: "工单状态",
-    prop: "status",
+    prop: "statusName",
   },
 ]);
 const onRefresh = () => {
@@ -101,6 +101,16 @@ const getList = (type) => {
     .post("/workOrder/page", req.value)
     .then((res) => {
       console.log(req.value);
+      res.data.rows.forEach((x) => {
+        x.statusName =
+          x.status === 0
+            ? "未开始"
+            : x.status === 1
+            ? "进行中"
+            : x.status === 2
+            ? "完成"
+            : "";
+      });
       listData.value =
         type === "refresh"
           ? res.data.rows