借料入库-批次号参考可选择
This commit is contained in:
		
							parent
							
								
									667ee05eb9
								
							
						
					
					
						commit
						2333e9555c
					
				|  | @ -10,7 +10,7 @@ const AREA = { | |||
|     cardHeadBtnArea: 'card_head', //卡片表头按钮区域
 | ||||
|     cardBodyBtnArea: 'card_body', //卡片表体按钮区域
 | ||||
|     cardBodyInnerBtnArea: 'card_body_inner', //卡片表体操作按钮区域
 | ||||
|     borrowMaterialDialog: 'NCTable_83c3abf9', //借料弹窗
 | ||||
|     // borrowMaterialDialog: 'NCTable_83c3abf9', //借料弹窗
 | ||||
|     borrowList: 'borrow_list', //借料弹窗页面编码
 | ||||
|     BORROW_DLG: 'BorrowDlg' //借料入库
 | ||||
| }; | ||||
|  | @ -71,13 +71,13 @@ const CARD_BTN = { | |||
|     Refresh: 'Refresh',//刷新
 | ||||
|     drop_more: 'drop_more', | ||||
| 
 | ||||
|     pushrzmes:'pushrzmes',//推送锐制
 | ||||
|     pushrzmes: 'pushrzmes',//推送锐制
 | ||||
| 
 | ||||
|     PickmDelivery: 'PickmDelivery',//领料
 | ||||
|     PickmDeliveryWithSet: 'PickmDeliveryWithSet',//成套领料
 | ||||
|     PickmReDeliveryWithSet: 'PickmReDeliveryWithSet',//补成套领料
 | ||||
|     ToReqPickm: 'ToReqPickm',//备料
 | ||||
|      | ||||
| 
 | ||||
|     toOtherWarehouse: 'toOtherWarehouse',//其他入库
 | ||||
|     DirectTrans: 'DirectTrans',//直接备料
 | ||||
|     PickmBackDelivery: 'PickmBackDelivery',//退料
 | ||||
|  | @ -203,7 +203,7 @@ const URL = { | |||
|     setBackDeliverQueryURL: '/nccloud/mmpac/pickm/setbackdeliverquery.do', | ||||
|     setBackDeliverComputURL: '/nccloud/mmpac/pickm/setbackdelivercomput.do', | ||||
|     checkToReqpickm: '/nccloud/mmpac/pickm/checktoreqpickm.do', | ||||
|     checkToDirectTrans:'/nccloud/mmpac/pickm/checktoDirectTrans.do', | ||||
|     checkToDirectTrans: '/nccloud/mmpac/pickm/checktoDirectTrans.do', | ||||
|     toReqpickm: '/reqpickm', | ||||
|     noItemDeliverQueryURL: '/nccloud/mmpac/pickm/noitemdeliverquery.do', | ||||
|     noItemDeliverURL: '/nccloud/mmpac/pickm/noitemdeliver.do', | ||||
|  | @ -212,13 +212,13 @@ const URL = { | |||
|     replaceQueryURL: '/nccloud/mmpac/pickm/replaceQuery.do', | ||||
|     replaceBodyQueryURL: '/nccloud/mmpac/pickm/replaceBodyQuery.do', | ||||
|     replaceDoURL: '/nccloud/mmpac/pickm/replace.do', | ||||
|     replaceAutoMatchURL:'/nccloud/mmpac/pickm/replaceAutoMatch.do', | ||||
|     replaceAutoMatchURL: '/nccloud/mmpac/pickm/replaceAutoMatch.do', | ||||
|     deleteLineURL: '/nccloud/mmpac/pickm/deleteline.do', | ||||
|     queryByCondURL:'/nccloud/mmpac/pickm/queryByCond.do', | ||||
|     convertOtherIn:'/nccloud/mmpac/pickm/convertOtherIn.do', | ||||
|     pickmItemsQuery:'/nccloud/mmpac/pickm/pickmItemsQuery.do', | ||||
|     pickmIdsQuery:'/nccloud/mmpac/pickm/pickmByIdsQuery.do', | ||||
|     pushrzmsURL:'/nccloud/mmpac/pickm/pushrzmes.do' | ||||
|     queryByCondURL: '/nccloud/mmpac/pickm/queryByCond.do', | ||||
|     convertOtherIn: '/nccloud/mmpac/pickm/convertOtherIn.do', | ||||
|     pickmItemsQuery: '/nccloud/mmpac/pickm/pickmItemsQuery.do', | ||||
|     pickmIdsQuery: '/nccloud/mmpac/pickm/pickmByIdsQuery.do', | ||||
|     pushrzmsURL: '/nccloud/mmpac/pickm/pushrzmes.do' | ||||
| }; | ||||
| 
 | ||||
| const tabURL = '/list'; | ||||
|  | @ -259,6 +259,7 @@ const FIELD = { | |||
|     cbastunitid: 'cbastunitid', | ||||
|     vbatchcode: 'vbatchcode', | ||||
|     vsrcid: 'vsrcid', //来源单据id
 | ||||
|     pk_group: 'pk_group', //集团
 | ||||
| }; | ||||
| //表头不可修改字段
 | ||||
| const headDisableFields = [ | ||||
|  | @ -481,24 +482,24 @@ let clearItems = [ | |||
|     'vfree10' | ||||
| ]; | ||||
| const headfixAssts = [ | ||||
| 	'cvendorid', | ||||
| 	'cvendorvid', | ||||
| 	'cproductorid', | ||||
| 	'cprojectid', | ||||
| 	'ccustomerid', | ||||
| 	'ccustomervid' | ||||
| 	// 'cqualitylevelid',
 | ||||
| 	//'cffileid'
 | ||||
|     'cvendorid', | ||||
|     'cvendorvid', | ||||
|     'cproductorid', | ||||
|     'cprojectid', | ||||
|     'ccustomerid', | ||||
|     'ccustomervid' | ||||
|     // 'cqualitylevelid',
 | ||||
|     //'cffileid'
 | ||||
| ]; | ||||
| const bodyfixAssts = [ | ||||
| 	'cbvendorid', | ||||
| 	'cbvendorvid', | ||||
| 	'cbproductorid', | ||||
| 	'cbprojectid', | ||||
| 	'cbcustomerid', | ||||
| 	'cbcustomervid' | ||||
| 	// 'cbqualitylevelid',
 | ||||
| 	//'cbffileid'
 | ||||
|     'cbvendorid', | ||||
|     'cbvendorvid', | ||||
|     'cbproductorid', | ||||
|     'cbprojectid', | ||||
|     'cbcustomerid', | ||||
|     'cbcustomervid' | ||||
|     // 'cbqualitylevelid',
 | ||||
|     //'cbffileid'
 | ||||
| ]; | ||||
| const headCustAndSupFild = { | ||||
|     ccustomerid: 'ccustomerid', | ||||
|  |  | |||
|  | @ -1,6 +1,15 @@ | |||
| import {AREA} from "../../../constance"; | ||||
| import {AREA, FIELD} from "../../../constance"; | ||||
| 
 | ||||
| export default async function headAfterEvent(props, moduleId, key, value, changedrows, i) { | ||||
|     // let headData = props.editTable.getAllData(AREA.borrowList, true);
 | ||||
|     // this.props.setHeadDatas(headData);
 | ||||
|     // console.log('value = ', value);
 | ||||
|     if (key == FIELD.vbatchcode) { | ||||
|         if (value.length > 0) { | ||||
|             let firstElement = value[0]; | ||||
|             let vbatchcode = firstElement.values.vbatchcode.value; | ||||
|             let pk_batchcode = firstElement.values.pk_batchcode.value; | ||||
|             props.editTable.setValByKeyAndIndex(moduleId, i, key, {value: vbatchcode, display: vbatchcode}); | ||||
|             props.editTable.setValByKeyAndIndex(moduleId, i, 'pk_batchcode', {value: pk_batchcode, display: null}); | ||||
|         } | ||||
| 
 | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -1,14 +1,19 @@ | |||
| import {FIELD} from "../../../constance"; | ||||
| import {processBatchCodeItem} from "../../../../wr/card/util/batchCodeUtil"; | ||||
| 
 | ||||
| export default function headBeforeEvent(props, moduleId, item, index, value, record) { | ||||
|     let key = item.attrcode; | ||||
|     let editFields = ['freplacetype']; | ||||
|     let editFields = ['vbatchcode']; | ||||
|     if (!editFields.includes(key)) { | ||||
|         return false; | ||||
|     } else if (key == 'freplacetype') { | ||||
|         //以替代的备料计划表体不能修改替代类型
 | ||||
|         let replaceInfo = props.editTable.getValByKeyAndIndex(moduleId, index, 'freplaceinfo').value; | ||||
|         if (replaceInfo == 2) { | ||||
|     } else if (key == FIELD.vbatchcode) { | ||||
|         let cmaterialvid = props.editTable.getValByKeyAndIndex(moduleId, index, FIELD.cmaterialvid).value; | ||||
|         //物料为空直接返回false 不可编辑
 | ||||
|         if (!cmaterialvid) { | ||||
|             toast({content: '缺少物料编码', color: 'warning'}); | ||||
|             return false; | ||||
|         } | ||||
|         processBatchCodeItem.call(this, props, moduleId, key, record, '4A', false); | ||||
|     } | ||||
|     return true; | ||||
| } | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ import React, {Component} from 'react'; | |||
| import {base, createPage, high} from 'nc-lightapp-front'; | ||||
| import {initTemplate} from './init'; | ||||
| import {initLang} from '../../../../../mmpub/mmpub/pub/tool/multiLangUtil'; | ||||
| import {headAfterEvent} from './events'; | ||||
| import {headAfterEvent, headBeforeEvent} from './events'; | ||||
| import {DIALOGCODE, AREA} from "../../constance"; | ||||
| 
 | ||||
| const {Refer} = high; | ||||
|  | @ -39,7 +39,7 @@ class PickmBorrowDlg extends Component { | |||
|                     // height: 100,
 | ||||
|                     // onRowClick: this.onRowClick.bind(this),
 | ||||
|                     // onRowDoubleClick: this.onRowDoubleClick.bind(this),
 | ||||
|                     // onBeforeEvent: headBeforeEvent.bind(this),
 | ||||
|                     onBeforeEvent: headBeforeEvent.bind(this), | ||||
|                     onAfterEvent: headAfterEvent.bind(this), | ||||
|                     isAddRow: false, | ||||
|                     showCheck: true | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue