/*i5PQSMPYUogtvO0HC5XJcEcPPka6LkJWmYqPsopNRy4=*/ /* * @Descripttion: * @version: * @Author: Chendch * @Date: 2020-11-12 09:31:05 * @LastEditors: Chendch * @LastEditTime: 2020-12-03 13:23:35 */ /** * 更新子表按钮状态 */ import { values} from "./../methodGroup/constance"; export default function(tableflag) { switch(tableflag){ case 'fi': let rows = this.props.editTable.getCheckedRows(values['fi']); if(rows && rows.length > 0){//fi_head_delete this.props.button.setDisabled({ fi_head_delete : false }); }else{ this.props.button.setDisabled({ fi_head_delete : true }); } break; case 'pfc': rows = this.props.editTable.getCheckedRows(values['pfc']); if(rows && rows.length > 0){//pfc_head_delete this.props.button.setDisabled({ pfc_head_delete : false }); }else{ this.props.button.setDisabled({ pfc_head_delete : true }); } break; case 'pu': rows = this.props.editTable.getCheckedRows(values['pu']); if(rows && rows.length > 0){//pu_head_delete this.props.button.setDisabled({ pu_head_delete : false }); }else{ this.props.button.setDisabled({ pu_head_delete : true }); } break; case 'plan': rows = this.props.editTable.getCheckedRows(values['plan']); if(rows && rows.length > 0){//plan_head_delete this.props.button.setDisabled({ plan_head_delete : false }); }else{ this.props.button.setDisabled({ plan_head_delete : true }); } break; case 'prod': rows = this.props.editTable.getCheckedRows(values['prod']); if(rows && rows.length > 0){//prod_head_delete this.props.button.setDisabled({ prod_head_delete : false }); }else{ this.props.button.setDisabled({ prod_head_delete : true }); } break; case 'cost': rows = this.props.editTable.getCheckedRows(values['cost']); if(rows && rows.length > 0){//cost_head_delete this.props.button.setDisabled({ cost_head_delete : false }); }else{ this.props.button.setDisabled({ cost_head_delete : true }); } break; case 'sale': rows = this.props.editTable.getCheckedRows(values['sale']); if(rows && rows.length > 0){//sale_head_delete this.props.button.setDisabled({ sale_head_delete : false }); }else{ this.props.button.setDisabled({ sale_head_delete : true }); } break; case 'stock': rows = this.props.editTable.getCheckedRows(values['stock']); if(rows && rows.length > 0){//stock_head_delete this.props.button.setDisabled({ stock_head_delete : false }); }else{ this.props.button.setDisabled({ stock_head_delete : true }); } break; case 'pfccinfo': rows = this.props.editTable.getCheckedRows(values['pfccinfo']); if(rows && rows.length > 0){//pfccinfo_head_delete this.props.button.setDisabled({ pfccinfo_head_delete : false }); }else{ this.props.button.setDisabled({ pfccinfo_head_delete : true }); } break; } } /*i5PQSMPYUogtvO0HC5XJcEcPPka6LkJWmYqPsopNRy4=*/