819527061@qq.com
2024-06-28 20ae88664bdbb4ae21ec3b13338d906ff1b7431a
pages/public-page/selectSpecifications/selectSpecifications.vue
@@ -34,13 +34,14 @@
                  <u-icon name="arrow-right"
                     slot="right-icon"
                     size="30"></u-icon></u-cell> -->
                     <niceui-data-select-input
                     <!-- <niceui-data-select-input
                     v-model="dataForm.secondClass"
                     :localdata="secondClassActionsList"
                     @change="change"
                     :value="dataForm.secondClass"
                     class="uni-px-5 uni-pb-5"
                     ></niceui-data-select-input>
                     ></niceui-data-select-input> -->
                     <uni-combox  :candidates="secondClassActionsList" placeholder="请选择二级品名" v-model="dataForm.secondClass"></uni-combox>
            </u-cell-group>
         </u-form-item>
         <u-form-item 
@@ -275,11 +276,7 @@
                     uni.hideLoading();
                     console.log(res.data,'result')
                     this.secondClassActionsList = res.data.map(v => {
                        return {
                           ...v,
                           value: v.secondCategoryName,
                           text:v.secondCategoryName
                        }
                        return v.secondCategoryName
                     })
                     // if(this.secondClassActionsList .length){
                     //    this.dataForm.secondClass = this.secondClassActionsList[0].value;
@@ -288,10 +285,7 @@
            //       }
                     if(params.actionObj){
                        let {breed,spec} = JSON.parse(params.actionObj);
                         this.secondClassActionsList.unshift({
                           value:breed,
                           text:breed
                        })
                         this.secondClassActionsList.unshift(breed)
                     this.dataForm.specifications= spec;;
                     this.dataForm.secondClass= breed;
                     this.dataForm.firstClass= JSON.parse(params.actionObj).firstClass || '';
@@ -516,7 +510,7 @@
                  value = parseFloat(value);
                  value = value + ""; // 变回为字符串
               }else{
                  value =  value.replace(/^(-)*(\d+)\.(\d\d).*$/,"$1$2.$3");
                  value =  value.replace(/^(-)*(\d+)\.(\d\d\d\d).*$/,"$1$2.$3");
                  
               } // 如果没有小数点,首位不能为类似于 01、02的值
               this.$nextTick(()=>{
@@ -538,6 +532,10 @@
      margin: 10px;
      position: relative;
   }
   /deep/   .uni-combox  {
         z-index: 99999!important
   }
   .slide-fade-enter-active {
      transition: all 0.3s ease-out;
@@ -567,4 +565,5 @@
         }
      }
   }
</style>