haoxuan
2024-04-19 75b4bf4554da6622cfe00f577829b256fc44f32c
产品清空操作选择下拉数据之后列表数据对不上的问题修改
3个文件已修改
68 ■■■■ 已修改文件
src/components/makepager/CommonFormTableView.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/AddOverviewDialog.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/OverviewListView.vue 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/CommonFormTableView.vue
@@ -89,7 +89,7 @@
                    size="mini"
                    @select="
                      (val) => {
                        handleSelectClient(val, item.prop, scope.row)
                        handleSelectClient(val, item.prop, scope.row,scope)
                      }
                    "
                  ></el-autocomplete>
@@ -588,8 +588,8 @@
      })
    },
    // 下拉搜索
    async handleSelectClient(value, item) {
      this.$emit("selProductClick", value, item)
    async handleSelectClient(value, item,row,scope) {
      this.$emit("selProductClick", value, item,row,scope)
      if (value === "product") {
        if (item.categoryId === 0 || item.categoryName === "") {
          this.productTypeNameOptions = []
src/views/overview/AddOverviewDialog.vue
@@ -473,6 +473,7 @@
                :addTypeIdMultiple="true"
                :product-table-list="productTableList"
                :detail-enter="!showFooter"
                @selProductClick="selProductClick"
                @inputContent="inputContent"
                @addProductClick="addProductClick('操作')"
                @getSelectArray="getSelectArray"
@@ -1484,7 +1485,8 @@
            moreUnit:res.product.moreUnit,
            moreUnitList:res.product.moreUnitList,
            auxiliaryUnit:res.auxiliaryUnit,
            auxiliaryAmount:res.amount&&adjunctAmount?Number(adjunctAmount)*Number(res.amount):0,
            // auxiliaryAmount:res.amount&&adjunctAmount?Number(adjunctAmount)*Number(res.amount):0,
            auxiliaryAmount:res.auxiliaryAmount,
            auxiliaryAmountInfo:adjunctAmount?Number(adjunctAmount):0,
            inputFloatAuxiliaryAmount:isValue,
            grossWeight:res.product.grossWeight==0?'':res.product.grossWeight,
@@ -1606,8 +1608,12 @@
      //   }
      // }
    },
    selProductClick(value, prop,row,scope){
      this.getSelectArray([value],scope.$index)
    },
    // 新增方式修改
    getSelectArray(val, index) {
      debugger
      if (this.tableData.length == 1 && this.tableData[0].number&&this.tableData[0].number.length == 0) {
        this.tableData = [];
      }
src/views/overview/OverviewListView.vue
@@ -358,31 +358,31 @@
    // bottom产品信息数据处理
    bottomProductData(arr) {
      const list = arr.details.map((item) => {
        let adjunctUnit=''
        let adjunctAmount=''
        if(item.product.moreUnit&&item.product.moreUnitList){
          let moreUnitList=item.product.moreUnitList
          if(moreUnitList.length>0){
            let isValue=false
            for(let j in moreUnitList){
              if(moreUnitList[j].floating){
                isValue=true;
                adjunctUnit=moreUnitList[j].unit
                adjunctAmount=moreUnitList[j].amount
                break;
              }
            }
            if(!isValue){
              for(let j in moreUnitList){
                 if(moreUnitList[j].unit){
                  adjunctUnit=moreUnitList[j].unit
                  adjunctAmount=moreUnitList[j].amount
                  break;
                }
              }
            }
          }
        }
        // let adjunctUnit=''
        // let adjunctAmount=''
        // if(item.product.moreUnit&&item.product.moreUnitList){
        //   let moreUnitList=item.product.moreUnitList
        //   if(moreUnitList.length>0){
        //     let isValue=false
        //     for(let j in moreUnitList){
        //       if(moreUnitList[j].floating){
        //         isValue=true;
        //         adjunctUnit=moreUnitList[j].unit
        //         adjunctAmount=moreUnitList[j].amount
        //         break;
        //       }
        //     }
        //     if(!isValue){
        //       for(let j in moreUnitList){
        //          if(moreUnitList[j].unit){
        //           adjunctUnit=moreUnitList[j].unit
        //           adjunctAmount=moreUnitList[j].amount
        //           break;
        //         }
        //       }
        //     }
        //   }
        // }
        return {
          ...item,
          productName: item.product.name,
@@ -391,8 +391,8 @@
          specs:item.product.specs,
          location: arr.location.name,
          toLocation: arr.toLocation.name,
          adjunctUnit:adjunctUnit,
          adjunctAmount:adjunctAmount&&item.amount?adjunctAmount:'',
          adjunctUnit:item.auxiliaryUnit,
          adjunctAmount:item.auxiliaryAmount,
          grossWeight:item.product.grossWeight==0?'':item.product.grossWeight,
          totalGrossWeight:item.totalGrossWeight,
          netWeight:item.product.netWeight==0?'':item.product.netWeight,