tk2312-web/src/uapbd/mmbase/bom0202/card/beforeEvents/onVitemversionBeforeEvent.js

40 lines
1.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*UmZBEVe2U13IxUxsq6MHookZD5SIkxd3DjgWV2JKe/2YE9mYJYCXbQs2CxrkaT2Y*/
/*
* @Author: liuyanp
* @PageInfo: BOM维护卡片-材料表体子项vitemversion前事件
* @Date: 2022-01-26 10:00:49
* @Last Modified by: liuyanp
* @Last Modified time: 2022-01-26 10:00:49
*/
//常量
import { BOM_AREA, BOM_BUSIENUM, BOM_CARD_HEAD_PROPERTY, BOM_CARD_ITEMS_PROPERTY } from '../../constance'
function onVitemversionBeforeEvent(props, value, index, record){
let condparam = {
pk_group: props.form.getFormItemsValue(BOM_AREA.bom_card_head, BOM_CARD_HEAD_PROPERTY.pk_group).value,
pk_org: props.form.getFormItemsValue(BOM_AREA.bom_card_head, BOM_CARD_HEAD_PROPERTY.pk_org).value,
hcmaterialid: props.cardTable.getValByKeyAndIndex(BOM_AREA.bom_card_b, index, BOM_CARD_ITEMS_PROPERTY.cmaterialid).value,
hcmaterialvid: props.cardTable.getValByKeyAndIndex(BOM_AREA.bom_card_b, index, BOM_CARD_ITEMS_PROPERTY.cmaterialvid).value,
//选配修改生产BOM参照将表头的BOM类型传递到后台
//后台判断如果为模型BOM参照根据物料的选配类型参照模型BOM或可选类BOM或生产BOM否则参照生产BOM
fbomtype: props.form.getFormItemsValue(BOM_AREA.bom_card_head, BOM_CARD_HEAD_PROPERTY.fbomtype).value==4?'4':'1'
}
props.cardTable.setQueryCondition(BOM_AREA.bom_card_b, {
[BOM_CARD_ITEMS_PROPERTY.vitemversion]: ()=>{
return condparam
}
})
props.cardTable.setQueryCondition(BOM_AREA.bom_card_b_02, {
[BOM_CARD_ITEMS_PROPERTY.vitemversion]: ()=>{
return condparam
}
})
}
export { onVitemversionBeforeEvent}
/*UmZBEVe2U13IxUxsq6MHookZD5SIkxd3DjgWV2JKe/2YE9mYJYCXbQs2CxrkaT2Y*/