zouyu
91 分钟以前 01a6c87b789624165373efa455e0520a613a6114
src/views/productionManagement/productStructure/index.vue
@@ -1,6 +1,30 @@
<template>
  <div class="app-container">
    <div class="table_list">
      <el-form :inline="true" :model="queryParams" class="search-bar" @submit.prevent>
        <el-form-item label="产品名称">
          <el-input
            v-model="queryParams.productName"
            placeholder="请输入产品名称"
            clearable
            style="width: 220px"
            @keyup.enter="handleQuery"
          />
        </el-form-item>
        <el-form-item label="规格型号">
          <el-input
            v-model="queryParams.productModelName"
            placeholder="请输入规格型号"
            clearable
            style="width: 220px"
            @keyup.enter="handleQuery"
          />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="handleQuery">查询</el-button>
          <el-button @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
      <div style="text-align: right; margin-bottom: 10px;">
        <el-button type="primary"
                   @click="handleAdd">新增</el-button>
@@ -160,7 +184,7 @@
      label: "操作",
      align: "center",
      fixed: "right",
      width: 150,
      width: 250,
      operation: [
        {
          name: "复制",
@@ -197,6 +221,10 @@
  const operationType = ref("add"); // add | edit
  const formRef = ref(null);
  const showProductSelectDialog = ref(false);
  const queryParams = reactive({
    productName: "",
    productModelName: "",
  });
  //  BOM导入参数
  const upload = reactive({
@@ -249,12 +277,25 @@
    getList();
  };
  const handleQuery = () => {
    page.current = 1;
    getList();
  };
  const resetQuery = () => {
    queryParams.productName = "";
    queryParams.productModelName = "";
    handleQuery();
  };
  // 查询列表
  const getList = () => {
    tableLoading.value = true;
    listPage({
      current: page.current,
      size: page.size,
      productName: queryParams.productName || undefined,
      productModelName: queryParams.productModelName || undefined,
    })
      .then(res => {
        const records = res?.data?.records || [];