加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

页面渲染的数据处理

发布时间:2020-12-14 05:08:48 所属栏目:大数据 来源:网络整理
导读:// 剔除没需要渲染的数据参数,只保留需要渲染的数据参数 produceList.forEach( function (item,index,array) { array[index] = { mercery: item.product.fabrication ? item.product.fabrication.name : item.fabrication_name, // 布类 order_qty: item.or
//剔除没需要渲染的数据参数,只保留需要渲染的数据参数
          produceList.forEach(function (item,index,array) {
            array[index] = {
              mercery: item.product.fabrication ? item.product.fabrication.name : item.fabrication_name,//布类
              order_qty: item.order_qty,//订单量
              knit_code: item.knit_code,//生产单号
              custom_code: item.custom_code ? item.custom_code : "",//客户单号(空的时候接口返回null,所以数据处理)
              custom_name: item.custom_name ? item.custom_name : "",//客户(空的时候接口返回null,所以数据处理)
              needle: item.gauge_diameters.length != 0 || item.gauge_diameters.length == null ? item.gauge_diameters.gauge.name + " - " + item.gauge_diameters.diameter.name : "",//针寸--> 居然有[]和{}两种格式,替接口背锅,数据判断
              gauze: item.gauze,//纱别
              machine_no: item.machine_no,//织机号
              day_qty: item.day_qty,//当日产量
              shipment_qty: item.shipment_qty,//出货总量
              store_qty: item.store_qty,//存厂总量
              updated_at: item.updated_at,//更新时间
            }
          })

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读