3个文件已修改
55 ■■■■ 已修改文件
src/views/operate/inventoryAdjustment/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/product/AddProductDialog.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/product/components/bomDialog.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/inventoryAdjustment/index.vue
@@ -209,7 +209,8 @@
    // 是否选择产品
    isSel() {
      for (let i = 0; i < this.tableData.length; i++) {
        if (this.tableData[i].productName?.length === 0) {
        // this.tableData[i].productName?.length === 0||!this.tableData[i].productId
        if (!this.tableData[i].productId||!this.tableData[i].isEdit) {
          this.isNoProduct = false
          break
        } else {
@@ -281,8 +282,9 @@
      this.locationId = row.locationId
      this.rowIndex = rowIndex
      this.isSel()
      if (!this.isNoProduct && this.currentRowId === 0) {
        this.$message.error("请完成当前新建或取消新建")
      //!this.isNoProduct && this.currentRowId == 0
      if (!this.isNoProduct) {
        this.$message.error("请完成当前保存或取消保存!")
      } else {
        this.currentRowId = row.id
        this.addTitle = "保存"
@@ -326,7 +328,7 @@
          productId:this.productId
        }).then((res)=>{
          if(res&&res.code===200){
            this.tableData[0].amount=res.data.amount||0
            this.tableData[0].amount=res.data?res.data.amount:0
          }
        })
      }
src/views/productManage/product/AddProductDialog.vue
@@ -86,6 +86,7 @@
                    <el-input
                      style="width: 85%"
                      :disabled="!showFooter"
                      clearable
                      v-model="editConfig.infomation.specs"
                      placeholder="请输入"
                    ></el-input>
@@ -95,6 +96,7 @@
                      v-model="editConfig.infomation.productType"
                      placeholder="请选择"
                      size="mini"
                      clearable
                      style="width: 85%"
                      :disabled="!showFooter"
                    >
@@ -146,8 +148,9 @@
                      placeholder="单位"
                      filterable
                      @change="Gtechange"
                      style="width: calc(85% - 110px)"
                      style="width: calc(85% - 0px)"
                    >
                    <!-- style="width: calc(85% - 110px)" -->
                      <el-option
                        v-for="ele in unitList"
                        :key="ele.id"
@@ -160,14 +163,14 @@
                      style="font-size: 20px; color: gray"
                      @click="handleUnitShow"
                    ></i>
                    <el-checkbox
                    <!-- <el-checkbox
                    class="margin_left_10px"
                    :disabled="editConfig.infomation.unit&&showFooter?false:true"
                    v-model="editConfig.infomation.moreUnit"
                    @change="moreUnitChange"
                    ></el-checkbox
                  >
                  <span class="margin_left_10px cursor_pointer"  @click="handleUnitMore">启用多单位</span>
                  > -->
                  <!-- <span class="margin_left_10px cursor_pointer"  @click="handleUnitMore">启用多单位</span> -->
                  </el-form-item>
                  
                  <el-form-item label="产品标签" prop="productTagName">
@@ -227,6 +230,7 @@
                      v-model="editConfig.infomation.categoryId"
                      placeholder="请选择"
                      size="mini"
                      clearable
                      style="width: 85%"
                      :disabled="!showFooter"
                    >
src/views/productManage/product/components/bomDialog.vue
@@ -6,7 +6,7 @@
      编辑下拉框>单位
    </div>
    <div class="drawerContent">
      <el-table v-if="isTableShow" :header-cell-style="{ background: '#f1f3f8', color: '#000009' }" ref="multipleTable"
      <el-table v-if="isTableShow" :header-cell-style="{ background: '#f1f3f8', color: '#000009' }" ref="unitTable"
        :data="thatEditRow.BomTableData" tooltip-effect="dark" height="440">
        <el-table-column prop="unit" label="单位">
          <template slot-scope="scope">
@@ -20,7 +20,7 @@
        </el-table-column>
        <el-table-column label="操作" width="100">
          <template slot-scope="scope">
            <i class="el-icon-delete" id="iconStyle" @click="handleDelete(scope.row.id)"></i>
            <i class="el-icon-delete cursor_pointer" id="iconStyle" @click="handleDelete(scope.row.id,scope)"></i>
          </template>
        </el-table-column>
      </el-table>
@@ -114,16 +114,20 @@
    handleAdd() {
      this.BomTableData=this.thatEditRow.BomTableData
      this.BomTableData.push({ name: "", isDefault: false });
      debugger
      this.$nextTick(()=>{
        setTimeout(() => {
          this.$refs.unitTable.bodyWrapper.scrollTop=this.$refs.unitTable.bodyWrapper.scrollHeight
          }, 500);
      })
    },
    handleDelete(id) {
      if (this.BomTableData.length === 1) {
    handleDelete(id,scope) {
      if (this.thatEditRow.BomTableData.length === 1) {
        this.$message.warning("至少保留一条数据");
        return;
      }
      this.BomTableData = this.thatEditRow.BomTableData.filter((i) => {
        return i.id != id;
      });
      this.thatEditRow.BomTableData=this.BomTableData
      this.thatEditRow.BomTableData.splice(scope.$index,1)
      this.BomTableData=this.thatEditRow.BomTableData
    },
    async getCodeStandardList() {
      const res = await getCodeStandardList(this.obj);
@@ -149,19 +153,10 @@
    },
    switchChange(scope, val) {
      this.BomTableData=this.thatEditRow.BomTableData
      let arr = [];
      for (let i in this.BomTableData) {
        if (this.BomTableData[i].isDefault) {
          arr.push(i);
        }
        this.thatEditRow.BomTableData[i].isDefault=false
      }
      if (arr.length > 1) {
        this.$message({
          message: "只能设一个为默认",
          type: "warning",
        });
        scope.row.isDefault = !val;
      }
      scope.row.isDefault = val;
    },
    handleConfirmSave() {
      let arr = [];