66 lines
1.8 KiB
JavaScript
66 lines
1.8 KiB
JavaScript
|
/*
|
||
|
* @Author: liuyanp
|
||
|
* @PageInfo: BOM维护-材料表体详细信息按钮事件
|
||
|
* @Date: 2022-01-20 10:51:49
|
||
|
* @Last Modified by: liuyanp
|
||
|
* @Last Modified time: 2022-01-20 10:51:49
|
||
|
*/
|
||
|
|
||
|
//常量
|
||
|
import { BOM_AREA, BOM_CARD_ITEMS_PROPERTY } from '../../constance';
|
||
|
|
||
|
//提示信息工具类
|
||
|
import { showWarningInfo } from '../../../public/tools/messageUtil'
|
||
|
//多语使用工具类
|
||
|
import { getLangByResId } from '../../../public/tools/multiLangUtil'
|
||
|
|
||
|
|
||
|
function wipsMaintainClick(props, id){
|
||
|
console.log({'Card buttonClick-wipsMaintainClick':{id: id}})
|
||
|
|
||
|
//空行过滤
|
||
|
clearEmptyRows(props)
|
||
|
|
||
|
let itemRows = props.cardTable.getAllRows(BOM_AREA.bom_card_b)
|
||
|
|
||
|
let rows = [];
|
||
|
if(itemRows.length>0){
|
||
|
for(let i = 0 ; i < itemRows.length ; i++){
|
||
|
if(itemRows[i].status != 3 ){
|
||
|
rows.push(itemRows[i]);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
let temp = []
|
||
|
for (let i = 0; i < itemRows.length; i++) {
|
||
|
temp.push(JSON.parse(JSON.stringify(props.cardTable.getRowsByIndexs(BOM_AREA.bom_card_b, i))))
|
||
|
}
|
||
|
this.setState({
|
||
|
buffer: temp
|
||
|
})
|
||
|
|
||
|
let status = props.cardTable.getStatus(BOM_AREA.bom_card_b)
|
||
|
let headitems = props.form.getAllFormValue(BOM_AREA.bom_card_head)
|
||
|
|
||
|
this.setState({
|
||
|
showGrand: true,
|
||
|
grandStatus: status,
|
||
|
revise: props.getUrlParam('reviseEdit'),
|
||
|
reviseEdit:props.getUrlParam('reviseEdit'),
|
||
|
allitems: props.cardTable.getAllRows(BOM_AREA.bom_card_b),
|
||
|
items: props.cardTable.getAllRows(BOM_AREA.bom_card_b),
|
||
|
headitems: props.form.getAllFormValue(BOM_AREA.bom_card_head),
|
||
|
isRow : false,
|
||
|
wipsmaintain: true
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
//空行过滤
|
||
|
function clearEmptyRows( props ){
|
||
|
props.cardTable.filterEmptyRows(BOM_AREA.bom_card_b, [BOM_CARD_ITEMS_PROPERTY.cmaterialvid], 'include');
|
||
|
}
|
||
|
|
||
|
export {wipsMaintainClick}
|