songshankun
2023-10-19 f12d2962b9b13185d07d5a52b07fc4dc51f32370
feat: 产品新建弹窗产品类别添加兜底数据
2个文件已修改
7 ■■■■ 已修改文件
src/views/productManage/product/AddProductDialog.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/productCategory/AddProductCategoryDialog.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/product/AddProductDialog.vue
@@ -165,7 +165,7 @@
                      :disabled="!showFooter"
                    >
                      <el-option
                        v-for="item in productCategoryOptions"
                        v-for="item in productCategoryListWithDefault"
                        :key="item.id"
                        :label="item.name"
                        :value="item.id"
@@ -482,6 +482,9 @@
  },
  components: {},
  computed: {
    productCategoryListWithDefault(){
      return [{id:0,name:'请选择'},...(this.productCategoryOptions ?? [])]
    },
    modalTitle(){
      if (this.editConfig.title === '编辑' && this.editConfig.autoEdit){
        return '编辑'
@@ -505,6 +508,7 @@
      memberOptions: [{ name: "管理员", id: 1 }],
      productCategoryOptions: [], // 产品类别
      productTypeOptions: [
        { name: "请选择", id: 0 },
        { name: "能消耗", id: 1 },
        { name: "服务", id: 2 },
        { name: "可库存产品", id: 3 }
src/views/productManage/productCategory/AddProductCategoryDialog.vue
@@ -198,7 +198,6 @@
  components: {},
  computed: {
    productCategoryListWithDefault(){
      console.log(this.productCategoryList)
      return [{id:0,name:'请选择'},...(this.productCategoryList?? [])]
    },
    modalTitle(){