zuozhengqing
2024-01-04 f45b159864ad79f326884ab3644269ef9eb7ee9d
src/views/overview/AddOverviewDialog.vue
@@ -468,7 +468,9 @@
    },
    workType: {
      type: Number,
      default: 1
      default: function() {
        return JSON.parse(window.sessionStorage.getItem('paramsData')).workType|| 1;
      }
    },
    addName: {
      type: String,
@@ -559,11 +561,11 @@
    }
    this.getLogisticCompanyList()
    this.formInfo()
  },
  mounted(){
    setTimeout(() => {
      this.$refs.tableView.setLocationList(this.editConfig.infomation.location.label)
    }, 100);
  },
  mounted(){
  },
  methods: {
    formInfo() {
@@ -767,37 +769,39 @@
              })
            }
            // 产品列表解构
            let arr=[]
            if(this.workType===1){
              params.details.map((item)=>{
                arr.push({
                  operationId:item.operationId,
                  amount:item.amount,
                  productId:item.productId
            if(this.editConfig.title === "编辑"){
              let arr=[]
              if(this.workType===1){
                params.details.map((item)=>{
                  arr.push({
                    operationId:item.operationId,
                    amount:item.amount,
                    productId:item.productId
                  })
                })
              })
              params.details=arr
            }else if(this.workType===2){
              params.details.map((item)=>{
                arr.push({
                  operationId:item.operationId,
                  amount:item.amount,
                  fromLocationId:item.fromLocation.id,
                  productId:item.productId,
                params.details=arr
              }else if(this.workType===2){
                params.details.map((item)=>{
                  arr.push({
                    operationId:item.operationId,
                    amount:item.amount,
                    fromLocationId:item.fromLocation.id,
                    productId:item.productId,
                  })
                })
              })
              params.details=arr
            }else if(this.workType===3){
              params.details.map((item)=>{
                arr.push({
                  operationId:item.operationId,
                  amount:item.amount,
                  fromLocationId:item.fromLocation.id,
                  toLocationId:item.toLocation.id,
                  productId:item.productId,
                params.details=arr
              }else if(this.workType===3){
                params.details.map((item)=>{
                  arr.push({
                    operationId:item.operationId,
                    amount:item.amount,
                    fromLocationId:item.fromLocation.id,
                    toLocationId:item.toLocation.id,
                    productId:item.productId,
                  })
                })
              })
              params.details=arr
                params.details=arr
              }
            }
            let requestUrl = this.editConfig.title === "新建" ? addOperation : updateOperation
            // let params = this.saveParams()