yangfeng
2023-11-15 cd16337013c7ea06e05330732b808c76fc45b72d
公共组件优化及产品管理列表
2个文件已修改
22 ■■■■■ 已修改文件
src/views/other/commonDialog/EditDropdownDialog.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/product/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other/commonDialog/EditDropdownDialog.vue
@@ -80,7 +80,8 @@
    return {
      dialogWidth: "20%",
      editConfig: this.editDropdownConfig,
      tableData: []
      tableData: [],
      isName: false
    }
  },
  created() {
@@ -101,7 +102,7 @@
        pageSize: 100
      }).then((res) => {
        console.log(res.data)
        this.tableData = res.data.data.list
        this.tableData = res.data.list
      })
    },
    // 所属行业
@@ -164,8 +165,23 @@
        name: ""
      })
    },
    // 判断添加name是否为空
    determineNameEmpty(data) {
      for (let i = 0; i < data.length; i++) {
        if (data[i].name.length === 0) {
          this.isName = true
          break
        } else {
          this.isName = false
        }
      }
    },
    async saveClick() {
      console.log(this.tableData)
      this.determineNameEmpty(this.tableData)
      if (this.isName) {
        this.$message.error("名称不能为空")
      } else {
      this.tableData.map((ite) => {
        ite.ID = 0
        return { ...ite }
@@ -196,6 +212,7 @@
    }
  }
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
src/views/productManage/product/index.vue
@@ -130,6 +130,7 @@
          const list = res.data.data.list.map((item) => {
            return {
              ...item,
              supplierName: item.supplier.name,
              supplierNumber: item.supplier.number
            }
          })