src/views/productionManagement/productionOrder/index.vue
@@ -102,6 +102,12 @@
      :order-data="currentOrderData"
      @save="handleSaveClearanceRecord"
    />
    <!-- 领料弹框 -->
    <material-requisition-dialog
      v-model="materialRequisitionVisible"
      :order-data="currentOrderData"
    />
  </div>
</template>
@@ -123,6 +129,7 @@
const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue"));
const ClearanceRecordDialog = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/ClearanceRecordDialog.vue"));
const MaterialRequisitionDialog = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/MaterialRequisitionDialog.vue"));
const {proxy} = getCurrentInstance();
@@ -244,6 +251,14 @@
          handleClearanceRecord(row);
        },
      },
      {
        name: "领料",
        type: "text",
        showHide: row => !row.isEnd,
        clickFun: row => {
          handleMaterialRequisition(row);
        },
      },
    ],
  },
]);
@@ -310,6 +325,9 @@
// 清场记录弹框
const clearanceDialogVisible = ref(false);
const currentOrderData = ref({});
// 领料弹框
const materialRequisitionVisible = ref(false);
const bindForm = reactive({
  orderId: null,
  routeId: null,
@@ -412,6 +430,7 @@
        processRouteCode: data.processRouteCode || "",
        productName: data.productName || "",
        model: data.model || "",
        uidNo: data.uidNo || "",
        bomNo: data.bomNo || "",
        description: data.description || "",
        orderId,
@@ -432,6 +451,7 @@
      bomNo: row.bomNo || "",
      productName: row.productCategory || "",
      productModelName: row.specificationModel || "",
      uidNo: row.uidNo || "",
      orderId: row.id,
      type: "order",
    },
@@ -525,6 +545,13 @@
    proxy.$modal.msgError("清场记录保存失败");
  }
};
// 打开领料弹框
const handleMaterialRequisition = (row) => {
  currentOrderData.value = row;
  materialRequisitionVisible.value = true;
};
onMounted(() => {
  getList();
});