songshankun
2023-10-18 c4926e25f0d61c621e781c54659b76bd9e6f54ab
feat: 产品类别表单非必填项添加兜底展示
2个文件已修改
21 ■■■■■ 已修改文件
src/api/data.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/productCategory/AddProductCategoryDialog.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/data.js
@@ -100,6 +100,10 @@
// 强制下架策略
const forceRemovalStrategy = [
  {
    name: "请选择",
    id: 0
  },
  {
    name: "First In First Out (FIFO)",
    id: 1
  },
@@ -115,6 +119,10 @@
//成本方法
const costingMethod = [
  {
    name: "请选择",
    id: 0
  },
  {
    name: "标准价格",
    id: 1
  },
@@ -130,6 +138,10 @@
// 库存计价
const inventoryValuation = [
  {
    name: "请选择",
    id: 0
  },
  {
    name: "手动",
    id: 1
  },
src/views/productManage/productCategory/AddProductCategoryDialog.vue
@@ -88,7 +88,7 @@
                    style="width: 85%"
                    :disabled="!showFooter"
                  >
                    <el-option v-for="item in productCategoryList" :key="item.id" :label="item.name" :value="item.id">
                    <el-option v-for="item in productCategoryListWithDefault" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
@@ -195,7 +195,12 @@
    }
  },
  components: {},
  computed: {},
  computed: {
    productCategoryListWithDefault(){
      console.log(this.productCategoryList)
      return [{id:0,name:'请选择'},...(this.productCategoryList?? [])]
    }
  },
  data() {
    return {
      dialogWidth: "50%",