遍历数据给后台

直接看代码
根据后台要的格式发送这个是我公司后台要的格式
因为乙方公司名称和乙方公司ID比较多直接发送一个数组或者字符串后端太懒不接收这样的参数 没办法只能按照他的要求来发送给他 当前用户ID 当前公司名称因为每个只有一条 所以只能给们循环然后遍历出来

			//发起签署
            createContractsAndPublish(){
                let _this = this
                for(let i = 0; i< this.dataList.length; i++ ){
                    _this.pcContInfoVOS.push({
                            contName:this.stencil,
                            createUserCompany:this.$cookie.get('currentCompanyId'),//当前公司ID
                            firstCompanyName:this.$cookie.get('currentCompanyName'),//当前公司名称                        
                            secondCompanyName:this.dataList[i].partnerCompanyName, //乙方公司名称
                            secondId:this.dataList[i].partnerCompanyCode, //乙方公司ID
                        });
                 }
               
                  this.$axios({
                        url:'地址',
                        method: 'post',
                        data: {
                            param:JSON.stringify({
                                templateId :'226a0d306504498db437256f02ed5b05',
                                pcContInfoVOS: _this.pcContInfoVOS
                            })
                        },
                        headers:{
                            Authorization:this.$cookie.get('token')
                        }
                        }).then(result =>{
                           
                        }).catch((error)=>{
                         
                        });
                }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值