huminmin
13 小时以前 c82a938c4fee27a6e478782ffc355809cd5cdcda
src/views/basicData/product/index.vue
@@ -25,9 +25,7 @@
          :data="list"
          @node-click="handleNodeClick"
          :expand-on-click-node="false"
          default-expand-all
          :default-expanded-keys="expandedKeys"
          :draggable="true"
          :filter-node-method="filterNode"
          :props="{ children: 'children', label: 'label' }"
          highlight-current
@@ -55,7 +53,7 @@
                >
                  编辑
                </el-button>
                <el-button type="primary" link @click="openProDia('add', data)">
                <el-button type="primary" link @click="openProDia('add', data)" :disabled="node.level >= 3">
                  添加产品
                </el-button>
                <el-button
@@ -97,10 +95,9 @@
        @selection-change="handleSelectionChange"
        :tableLoading="tableLoading"
        @pagination="pagination"
        :total="total"
      ></PIMTable>
    </div>
    <el-dialog v-model="productDia" title="产品" width="400px">
    <el-dialog v-model="productDia" title="产品" width="400px" @keydown.enter.prevent>
      <el-form
        :model="form"
        label-width="140px"
@@ -115,6 +112,7 @@
                v-model="form.productName"
                placeholder="请输入产品名称"
                clearable
                @keydown.enter.prevent
              />
            </el-form-item>
          </el-col>
@@ -132,6 +130,7 @@
      title="规格型号"
      width="400px"
      @close="closeModelDia"
      @keydown.enter.prevent
    >
      <el-form
        :model="modelForm"
@@ -147,6 +146,7 @@
                v-model="modelForm.model"
                placeholder="请输入规格型号"
                clearable
                @keydown.enter.prevent
              />
            </el-form-item>
          </el-col>
@@ -158,6 +158,7 @@
                v-model="modelForm.unit"
                placeholder="请输入单位"
                clearable
                @keydown.enter.prevent
              />
            </el-form-item>
          </el-col>
@@ -227,11 +228,11 @@
const tableData = ref([]);
const tableLoading = ref(false);
const isShowButton = ref(false);
const total = ref(0);
const selectedRows = ref([]);
const page = reactive({
  current: 1,
  size: 10,
  total: 0,
});
const data = reactive({
  form: {
@@ -316,6 +317,7 @@
  proxy.$refs.formRef.resetFields();
  productDia.value = false;
};
// 删除产品
const remove = (node, data) => {
  let ids = [];
@@ -388,7 +390,7 @@
  }).then((res) => {
    console.log("res", res);
    tableData.value = res.records;
    total.value = res.total;
    page.total = res.total;
    tableLoading.value = false;
  });
};