
import { Button, Popconfirm } from 'antd'
import ListPage from '../../components/Table/ListPage';
import {initFilter} from "../../utils/common";

//接收记录
export default {
  colSplitArea:({record })=> {
    if(record.Nav_InWork&&record.Nav_InWork.Nav_PdtProcessDetail&&record.Nav_InWork.Nav_PdtProcessDetail.Nav_Unit){
      const unitCode=record.Nav_InWork.Nav_PdtProcessDetail.Nav_Unit.CODE;
      if(unitCode=='PNL'){
        if(record.Nav_InWork&&record.Nav_InWork.Nav_PdtOrder&&record.Nav_InWork.Nav_PdtOrder.Nav_MrpOrderWork&&record.Nav_InWork.Nav_PdtOrder.Nav_MrpOrderWork.Nav_MrpOrderEmProposal){
          return record.QTY*
            record.Nav_InWork.Nav_PdtOrder.Nav_MrpOrderWork.Nav_MrpOrderEmProposal.LENGTH*record.Nav_InWork.Nav_PdtOrder.Nav_MrpOrderWork.Nav_MrpOrderEmProposal.WIDTH/1000000;
        }
      }
      else if(unitCode=='SET'){
        if(record.Nav_InWork&&record.Nav_InWork.Nav_Product)
          return record.QTY*record.Nav_InWork.Nav_Product.SPLIT_LENGTH*
              record.Nav_InWork.Nav_Product.SPLIT_WIDTH/1000000;
      }
      else if(unitCode=='PCS'){
        if(record.Nav_InWork&&record.Nav_InWork.Nav_Product&&record.Nav_InWork.Nav_Product.SPLIT_QTY)
          return record.QTY*record.Nav_InWork.Nav_Product.SPLIT_LENGTH*
            record.Nav_InWork.Nav_Product.SPLIT_WIDTH/record.Nav_InWork.Nav_Product.SPLIT_QTY/1000000;
      }
    }
  },

}
