haoxuan
2024-05-07 1cd64a26daed3e0eb7b4ccf74e50267d79eaef09
src/views/productManage/productRegisterForm/addProductRegisterPage.vue
@@ -124,7 +124,7 @@
                    placeholder="请先选择车间"
                    no-data-text='请先选择车间'
                    class="select-width"
                    @change='getGroupNumber'
                    @change="getGroupNumber(false,'groupNumber')"
                  >
                    <el-option
                      v-for="item in workshopGroupList"
@@ -491,7 +491,7 @@
            align="center"
          >
          <template slot-scope="scope">
               {{scope.row.peopleYield!=0?scope.row.peopleYield:''}}
               {{scope.row.peopleYield!=0?scope.row.peopleYield.toFixed(2):''}}
            </template>
          </el-table-column>
          <el-table-column  
@@ -837,7 +837,7 @@
      }
      this.getPeopleYield(row)
      row.oneYield=Number(string);
      return string;
      return string.toFixed(2);
    },
    getPeopleYield(row){
      let string=0
@@ -877,7 +877,7 @@
        }
      }
      row['allYield'+val]=Number(string);
      return string;
      return string.toFixed(2);
    },
    changeForm(form,val,data){
      if(val){
@@ -990,21 +990,25 @@
        }
      });
    },
    getGroupNumber(val){
    getGroupNumber(val,prop){
      if(this.ruleForm.workshopNumber){
        //组别
        getWorkshopManageGroup({number:this.ruleForm.workshopNumber}).then((res) => {
           if (res.code == 200) {
              let workshopGroupList = res.data || {};
              this.workshopGroupList=[]
              this.ruleForm.groupNumber=''
              if(Object.keys(workshopGroupList).length>0){
                for(let i in workshopGroupList){
                  this.workshopGroupList.push(workshopGroupList[i])
                }
                if(prop&&prop!='groupNumber'){
                  this.ruleForm.groupNumber=''
                }
                // 编辑
                if(val){
                  this.$set(this.ruleForm,'groupNumber',this.ruleForm.groupNumber)
                  setTimeout(()=>{
                    this.$set(this.ruleForm,'groupNumber',this.ruleForm.groupNumber)
                  },200)
                }
              }
            }else{