zuozhengqing
2023-10-19 c40afc5b937b625a78cf884284458a3c8d80df1e
src/views/productManage/product/AddProductDialog.vue
@@ -29,7 +29,6 @@
        label-position="right"
        label-width="110px"
        size="mini"
        style="height: 53vh; overflow-x: hidden"
      >
        <!-- <div class="content-btn">
          <el-button plain size="mini" disabled>标签打印</el-button>
@@ -40,7 +39,9 @@
          <FormBtnsView
            :add-product="addProduct"
            @inOutBoundClick="inOutBoundClick"
            @inLibraryClick="inLibraryClick"
            :show-procure="showProcure"
            :countObject="statisticsMap"
            :show-sale="showSale"
          />
          <div class="bottom">
@@ -450,8 +451,8 @@
        </div>
      </el-form>
      <!-- 尾 -->
      <div v-if="showFooter" slot="footer" class="dialog-footer">
        <el-button type="primary" size="small" @click="saveClick('form')">保存</el-button>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" size="small" @click="saveClick('form')" :disabled="!showFooter">保存</el-button>
        <el-button size="small" @click="editConfig.visible = false">取消</el-button>
      </div>
    </el-dialog>
@@ -525,7 +526,10 @@
        { name: "辅料", id: "辅料" },
        { name: "耗材", id: "耗材" },
        { name: "其他", id: "其他" }
      ]
      ],
      statisticsMap: {
        inLibrary: 0 // 在库
      }
    }
  },
  created() {
@@ -533,6 +537,7 @@
    this.getProductList()
    this.setTableForm()
    this.setBottonView()
    this.statisticsMap.inLibrary = this.editConfig?.infomation?.amount ?? 0
  },
  methods: {
    // 获取产品类别
@@ -725,6 +730,19 @@
        })
      }
    },
    // 在库点击
    inLibraryClick(){
      if (this.editConfig.title !== "新建") {
        console.log(this.editConfig.infomation)
        this.$router.push({
          name: "inventoryReport",
          params: {
            name: this.editConfig.infomation.name,
            id: this.editConfig.infomation.id
          }
        })
      }
    },
    // 可销售/可采购
    checkboxChange(val, param) {
      if (val === "采购") {