yangfeng
2023-09-15 b823a11d74b6623fadcfab27150cdbb0ad9766f5
src/views/productManage/product/AddProductDialog.vue
@@ -38,7 +38,7 @@
        </div>
        <div class="basic-info">
          <FormBtnsView @inOutBoundClick="inOutBoundClick" />
          <FormBtnsView :add-product="addProduct" @inOutBoundClick="inOutBoundClick" :show-procure="showProcure" />
          <div class="basic-info-view">
            <el-row>
              <el-col :span="20">
@@ -59,8 +59,12 @@
              </el-col>
              <el-col :span="24">
                <div style="margin-left: 20px; margin-top: -30px">
                  <el-checkbox v-model="marketable" :disabled="!showFooter">可销售</el-checkbox>
                  <el-checkbox v-model="procurable" :disabled="!showFooter">可采购</el-checkbox>
                  <el-checkbox v-model="marketable" :disabled="!showFooter" @change="checkboxChange('销售', $event)"
                    >可销售</el-checkbox
                  >
                  <el-checkbox v-model="procurable" :disabled="!showFooter" @change="checkboxChange('采购', $event)"
                    >可采购</el-checkbox
                  >
                </div>
              </el-col>
            </el-row>
@@ -457,7 +461,9 @@
      marketable: true, // 可销售
      procurable: true, // 可采购
      checkedCities: ["上海", "北京"],
      cities: ["上海对对对对对对多多多多多多多北京对对对对对对", "北京对对对对对对多", "广州", "深圳"]
      cities: ["上海对对对对对对多多多多多多多北京对对对对对对", "北京对对对对对对多", "广州", "深圳"],
      addProduct: false,
      showProcure: true
    }
  },
  created() {
@@ -471,9 +477,11 @@
        this.showButton = false
        this.showEdit = false
        this.showFooter = true
        this.addProduct = true
      } else {
        this.showEdit = true
        this.showFooter = false
        this.addProduct = false
      }
    },
    // 关闭
@@ -596,6 +604,12 @@
    // 进出点击
    inOutBoundClick() {
      this.$router.push({ path: "/reportForm/inOutboundDetail", query: { name: "产品名称/出入库明细" } })
    },
    // 可销售/可采购
    checkboxChange(val, param) {
      if (val === "采购") {
        this.showProcure = param
      }
    }
  }
}