2025-08-09 15:11:08 +08:00
|
|
|
|
/*5DCWGb80y+l5l4k+uVmSXxDs3csRTDfNfehwqPZYNBw=*/
|
2025-08-08 11:34:20 +08:00
|
|
|
|
/*
|
|
|
|
|
* @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 { ajax } from 'nc-lightapp-front';
|
|
|
|
|
import { BOM_AREA, BOM_CARD_ITEMS_PROPERTY,URL } from '../../constance';
|
|
|
|
|
import { showWarningInfo } from '../../../public/tools/messageUtil'
|
|
|
|
|
//多语使用工具类
|
|
|
|
|
import { getLangByResId } from '../../../public/tools/multiLangUtil'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function showGrandRowClick(props, id, record, index){
|
|
|
|
|
console.log({'Card buttonClick-showGrandRowClick':{id: id}})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let itemRows = props.cardTable.getAllRows(BOM_AREA.bom_card_b)
|
|
|
|
|
let status = props.cardTable.getStatus(BOM_AREA.bom_card_b)
|
|
|
|
|
let headitems = props.form.getAllFormValue(BOM_AREA.bom_card_head)
|
|
|
|
|
//在模型BOM下子项是模型件或可选类件时,其详细信息按钮点击时提示“选配件不支持此操作”
|
|
|
|
|
let bomtype = headitems.rows[0].values.fbomtype.value;
|
|
|
|
|
if (bomtype == 4) {
|
|
|
|
|
let vid = props.cardTable.getValByKeyAndIndex(BOM_AREA.bom_card_b, index, BOM_CARD_ITEMS_PROPERTY.cmaterialvid).value;
|
|
|
|
|
let materialData={
|
|
|
|
|
vids:[vid]
|
|
|
|
|
}
|
|
|
|
|
ajax({
|
|
|
|
|
url: URL.queryMaterialMarchMode,
|
|
|
|
|
data:materialData,
|
|
|
|
|
success: (res) => {
|
|
|
|
|
if(res.data&&res.data[vid]&&(2==res.data[vid]||3==res.data[vid])){
|
|
|
|
|
showWarningInfo('', getLangByResId(this, '10140CBOMM-000006'), 'infinity') ;
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
this.setState({
|
|
|
|
|
showGrand: true,
|
|
|
|
|
grandStatus: status,
|
|
|
|
|
allitems: props.cardTable.getAllRows(BOM_AREA.bom_card_b),
|
|
|
|
|
items: props.cardTable.getRowsByIndexs(BOM_AREA.bom_card_b, index),
|
|
|
|
|
headitems: headitems,
|
|
|
|
|
isRow: true
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
this.setState({
|
|
|
|
|
showGrand: true,
|
|
|
|
|
grandStatus: status,
|
|
|
|
|
allitems: props.cardTable.getAllRows(BOM_AREA.bom_card_b),
|
|
|
|
|
items: props.cardTable.getRowsByIndexs(BOM_AREA.bom_card_b, index),
|
|
|
|
|
headitems: headitems,
|
|
|
|
|
isRow: true
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//空行过滤
|
|
|
|
|
function clearEmptyRows( props ){
|
|
|
|
|
props.cardTable.filterEmptyRows(BOM_AREA.bom_card_b, [BOM_CARD_ITEMS_PROPERTY.cmaterialvid], 'include');
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-09 15:11:08 +08:00
|
|
|
|
export {showGrandRowClick}
|
|
|
|
|
/*5DCWGb80y+l5l4k+uVmSXxDs3csRTDfNfehwqPZYNBw=*/
|