lxf 1 year ago
parent
commit
bcd3d54fe9
1 changed files with 36 additions and 3 deletions
  1. 36 3
      src/views/production/schedule/production-work-order/index.vue

+ 36 - 3
src/views/production/schedule/production-work-order/index.vue

@@ -71,6 +71,32 @@ import { ElMessage, ElMessageBox } from "element-plus";
 import CycleBarcode from "/src/components/CycleBarcode";
 import CycleBarcode from "/src/components/CycleBarcode";
 
 
 const { proxy } = getCurrentInstance();
 const { proxy } = getCurrentInstance();
+const statusList = ref([
+  {
+    dictKey: 0,
+    dictValue: "待投产",
+  },
+  {
+    dictKey: 1,
+    dictValue: "已扫描",
+  },
+  {
+    dictKey: 2,
+    dictValue: "生产中",
+  },
+  {
+    dictKey: 3,
+    dictValue: "生产完成",
+  },
+  {
+    dictKey: 4,
+    dictValue: "生产异常",
+  },
+  {
+    dictKey: 5,
+    dictValue: "重新排单",
+  },
+]);
 const sourceList = ref({
 const sourceList = ref({
   data: [],
   data: [],
   pagination: {
   pagination: {
@@ -84,6 +110,7 @@ const sourceList = ref({
     bomSpecCode: "",
     bomSpecCode: "",
     bomSpecName: "",
     bomSpecName: "",
     productionWorkOrderCode: "",
     productionWorkOrderCode: "",
+    status: [0, 4],
   },
   },
 });
 });
 const loading = ref(false);
 const loading = ref(false);
@@ -124,6 +151,13 @@ const searchConfig = computed(() => {
       prop: "productionWorkOrderCode",
       prop: "productionWorkOrderCode",
       label: "工单号",
       label: "工单号",
     },
     },
+    {
+      type: "select",
+      prop: "status",
+      label: "生产状态",
+      data: statusList.value,
+      multiple: true,
+    },
   ];
   ];
 });
 });
 const config = computed(() => {
 const config = computed(() => {
@@ -190,9 +224,7 @@ const config = computed(() => {
         width: 80,
         width: 80,
       },
       },
       render(val) {
       render(val) {
-        if (val == 0) {
-          return "待投产";
-        }
+        return proxy.dictKeyValue(val, statusList.value);
       },
       },
     },
     },
     {
     {
@@ -239,6 +271,7 @@ const getList = async (req, status) => {
     sourceList.value.pagination = {
     sourceList.value.pagination = {
       pageNum: sourceList.value.pagination.pageNum,
       pageNum: sourceList.value.pagination.pageNum,
       pageSize: sourceList.value.pagination.pageSize,
       pageSize: sourceList.value.pagination.pageSize,
+      status: [0, 4],
     };
     };
   } else {
   } else {
     sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
     sourceList.value.pagination = { ...sourceList.value.pagination, ...req };