smileTan

导航

es同步

 1 suppliesModelOk= async(rows)=>{
 2     this.onhandleCancel()
 3     const {dispatch} = this.props;
 4     const {prod_arr} = this.state;
 5     let new_arr = [];
 6     for(var i=0;i<rows.length;i++){
 7       new_arr.push({
 8         midClassCode : rows[i].prodClassCode,
 9         midClassName : rows[i].prodClassName,
10         aplyComId : prod_arr[0].applyComId,
11         applyComName : prod_arr[0].applyComName,
12         standard : rows[i].prodParaOne,
13         model:rows[i].prodParaTwo,
14         bigClassCode : !!rows[i].bigClassCode?rows[i].bigClassCode:!!rows[i].fullCode?rows[i].fullCode.split("_")[0]:null,
15         bigClassName :!!rows[i].bigClassName?rows[i].bigClassName:!!rows[i].fullCodeName?rows[i].fullCodeName.split("_")[0]:null,
16         prodCode : rows[i].prodCode,
17         prodName : rows[i].prodName,
18         unitId : rows[i].unitId,
19         unitName : rows[i].unitName,
20         remark : rows[i].remark,
21         inQuantity:rows[i].inQuantity?rows[i].inQuantity:rows[i].quantity,
22         impurityRate:rows[i].impurityRate
23       })
24       await dispatch({
25         type: 'recyclePlanMgmtM/getPriceInfo',
26         payload: {
27             "prodCode":rows[i].prodCode
28         },
29         callback: (response) => {
30             if (response.status) {
31               new_arr[i].price = response.data.recPrice;
32             }
33           }
34       })
35     }
36 
37     this.setState({
38       sort_arr: new_arr,
39       btnState:rows.length>0?false:true
40     });
41     
42   }

 

posted on 2020-11-02 14:30  smileTan  阅读(140)  评论(0编辑  收藏  举报