生产领料-输出按钮调整
This commit is contained in:
		
							parent
							
								
									98d1c7b5ba
								
							
						
					
					
						commit
						aacecc1202
					
				|  | @ -19,7 +19,8 @@ const AREA = { | |||
|     bodyPageArea: '50080105_onhandbody', | ||||
| 
 | ||||
|     dataSource: 'mmpac.mmpac.issue.data', | ||||
| 	issueAppcode: '50080105' | ||||
|     issueAppcode: '50080105', | ||||
|     nodekey: 'scll01' | ||||
| }; | ||||
| const PK = { | ||||
|     pickmHeadPK: 'cpickmid', | ||||
|  | @ -48,6 +49,7 @@ const BUTTON = { | |||
|     copy: 'CopyRow', //复制
 | ||||
|     deleteLine: 'DelRow', //删行|移除
 | ||||
|     refresh: 'Refersh', //刷新
 | ||||
|     Output: 'Output', //输出
 | ||||
|     bodyOnhandQuery: 'BodyIssueATPHideShowAction', //存量查拣
 | ||||
|     UnPlaseBtns: ['BodyIssueATPHideShowAction', 'DelRow', 'CopyRow'], | ||||
|     PlaseBtns: ['PasteThis', 'PasteCancel'], | ||||
|  | @ -62,6 +64,7 @@ const URL = { | |||
|     queryDirectTrans: '/nccloud/mmpac/issue/issueDirectTransQuery.do', | ||||
|     issueDirectTrans: '/nccloud/mmpac/issue/issueDirectTransAction.do', | ||||
|     checkIsNccNative: '/nccloud/mmpac/issue/checkIsNccNative.do', | ||||
|     pickmPrint: '/nccloud/mmpac/issue/printAction.do', | ||||
|     //编辑事件
 | ||||
|     issuePickmBeforeEditEvent: '/nccloud/mmpac/issue/issueBeforeEditForPickm.do', | ||||
|     issuePickmAfterEditEvent: '/nccloud/mmpac/issue/issueAfterEditForPickm.do', | ||||
|  | @ -140,6 +143,18 @@ const pickmBodyCustAndSupFild = { | |||
|     cvendorid: 'cbvendorid', | ||||
|     cvendorvid: 'cbvendorvid' | ||||
| }; | ||||
| export { AREA, STATUS, URL, BUTTON, PK, BILLTYPE, FIELD, CACHE, issuePickmField,pickmBodyfixAssts ,pickmBodyCustAndSupFild}; | ||||
| export { | ||||
|     AREA, | ||||
|     STATUS, | ||||
|     URL, | ||||
|     BUTTON, | ||||
|     PK, | ||||
|     BILLTYPE, | ||||
|     FIELD, | ||||
|     CACHE, | ||||
|     issuePickmField, | ||||
|     pickmBodyfixAssts, | ||||
|     pickmBodyCustAndSupFild | ||||
| }; | ||||
| 
 | ||||
| /*auVpq9xwZL1gPRSzNVP/w0hBm26YHXsnVMAUlT2iQRQ=*/ | ||||
|  | @ -1,5 +1,10 @@ | |||
| /*9LNhEcWwOPqFwoyI0rg5Tvi1KVVJuZ+O99DtbZayIQc=*/ | ||||
| import { serachPickm_btnClick, serachReqpickm_btnClick, serachDirectTrans_btnClick, directTransBtnClick } from './index.js'; | ||||
| import { | ||||
|     serachPickm_btnClick, | ||||
|     serachReqpickm_btnClick, | ||||
|     serachDirectTrans_btnClick, | ||||
|     directTransBtnClick | ||||
| } from './index.js'; | ||||
| import {ajax, cacheTools} from 'nc-lightapp-front'; | ||||
| import {BUTTON, BILLTYPE, AREA, URL, CACHE, issuePickmField} from '../../constance'; | ||||
| import {getLangByResId} from '../../../../../mmpub/mmpub/pub/tool/multiLangUtil'; | ||||
|  | @ -67,8 +72,7 @@ export default function onList_BtnClicks(props, btncode, text, record, index) { | |||
|                 } else { | ||||
|                     serachReqpickm_btnClick.call(this, true) | ||||
|                 } | ||||
| 			} | ||||
| 			else if (this.state.tabType == BILLTYPE.directTrans) { | ||||
|             } else if (this.state.tabType == BILLTYPE.directTrans) { | ||||
|                 let allData = this.props.editTable.getAllData(AREA.directTransViewTableArea); | ||||
|                 if (allData && allData.rows && allData.rows.length > 0) { | ||||
|                     /**国际化:当前单据已有领料数据,重新查询将被清空,您确定继续吗? */ | ||||
|  | @ -95,7 +99,8 @@ export default function onList_BtnClicks(props, btncode, text, record, index) { | |||
|             break; | ||||
|         case BUTTON.copy: | ||||
|             //清空出库数量,主数量
 | ||||
| 			let newRecord = JSON.parse(JSON.stringify(record));; | ||||
|             let newRecord = JSON.parse(JSON.stringify(record)); | ||||
|             ; | ||||
|             if (this.state.tabType == BILLTYPE.pickm) { | ||||
|                 newRecord.values['nbcckastnum'].value = 0; | ||||
|                 newRecord.values['nbccknum'].value = 0; | ||||
|  | @ -143,12 +148,12 @@ export default function onList_BtnClicks(props, btncode, text, record, index) { | |||
|             ); | ||||
|             break; | ||||
|         // 输出功能
 | ||||
| 		case "Output": | ||||
| 
 | ||||
|         case BUTTON.Output: | ||||
|             let isAll = false; | ||||
|             let tableData = []; | ||||
|             let oids = []; | ||||
| 			let selectedRow = this.props.editTable.getCheckedRows(AREA.pickmViewTableArea);; | ||||
|             let selectedRow = this.props.editTable.getCheckedRows(AREA.pickmViewTableArea); | ||||
|             ; | ||||
|             let indexs = []; | ||||
|             if (!selectedRow || selectedRow.length < 1) { | ||||
|                 isAll = true; | ||||
|  | @ -160,45 +165,20 @@ export default function onList_BtnClicks(props, btncode, text, record, index) { | |||
|                 oids.push(row.data.values.cpickm_bid.value); | ||||
|             }); | ||||
|             let printdata = { | ||||
| 				funcode: "50080105", | ||||
| 				nodekey: "10086", | ||||
|                 funcode: AREA.issueAppcode, | ||||
|                 nodekey: AREA.nodekey, | ||||
|                 oids: oids, | ||||
|                 outputType: "output", | ||||
|             }; | ||||
|             //小应用编码//小应用编码
 | ||||
|             //默认模板分配的key//需要输出的单据主键//输出类型 --默认output
 | ||||
| 			output({ url: "/nccloud/mmpac/issue/printAction.do", data: printdata }); | ||||
|             output({url: URL.pickmPrint, data: printdata}); | ||||
|             break; | ||||
|         default: | ||||
|             break; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| // function onOutput() {
 | ||||
| // 	let isAll = false;
 | ||||
| // 	let tableData = [];
 | ||||
| // 	let oids=[];
 | ||||
| // 	let selectedRow = this.props.editTable.getCheckedRows(AREA.pickmViewTableArea);;
 | ||||
| // 	let indexs = [];
 | ||||
| // 	if (!selectedRow || selectedRow.length < 1) {
 | ||||
| // 		isAll = true;
 | ||||
| // 		tableData = this.props.editTable.getAllRows(AREA.pickmViewTableArea);
 | ||||
| // 	}
 | ||||
| // 	tableData.forEach((row) => {
 | ||||
| // 		oids.push(row.values.cpickm_bid.value);
 | ||||
| // 	});
 | ||||
| // 	let printdata={
 | ||||
| // 		funcode: this.config.moduleId,
 | ||||
| // 		appcode: this.config.moduleId,
 | ||||
| // 		nodekey: nodekey,
 | ||||
| // 		oids: oids,
 | ||||
| // 		outputType: "output",
 | ||||
| // 	};
 | ||||
| // 	//小应用编码//小应用编码
 | ||||
| // 	//默认模板分配的key//需要输出的单据主键//输出类型 --默认output
 | ||||
| // 	output({ url: urls['print'], data: printdata });
 | ||||
| // };
 | ||||
| 
 | ||||
| //下游单据
 | ||||
| function downStreamBill() { | ||||
|     ajax({ | ||||
|  | @ -407,8 +387,7 @@ async function reserveIssue() { | |||
|     if (!selectedRow || selectedRow.length < 1) { | ||||
|         isAll = true; | ||||
|         tableData = this.props.editTable.getAllRows(AREA.reqpickmViewTableArea); | ||||
| 	} | ||||
| 	else { | ||||
|     } else { | ||||
|         selectedRow.map((item) => { | ||||
|             tableData.push(item.data); | ||||
|             indexs.push(item.index); | ||||
|  | @ -452,8 +431,7 @@ async function reserveIssue() { | |||
|                     } | ||||
|                     if (isAll) { | ||||
|                         this.props.editTable.setTableData(AREA.reqpickmViewTableArea, res.data[AREA.reqpickmViewTableArea]); | ||||
| 					} | ||||
| 					else { | ||||
|                     } else { | ||||
|                         let updateArray = []; | ||||
|                         let rows = res.data[AREA.reqpickmViewTableArea].rows; | ||||
|                         for (let j = 0; j < rows.length; j++) { | ||||
|  | @ -483,8 +461,7 @@ async function destIssue(flag) { | |||
|     if (!selectedRow || selectedRow.length < 1) { | ||||
|         isAll = true; | ||||
|         tableData = this.props.editTable.getAllRows(AREA.pickmViewTableArea); | ||||
| 	} | ||||
| 	else { | ||||
|     } else { | ||||
|         selectedRow.map((item) => { | ||||
|             tableData.push(item.data); | ||||
|             indexMap.set(item.data.values.cpickm_bid.value, item.index); | ||||
|  | @ -560,8 +537,7 @@ async function destIssue(flag) { | |||
|                         } | ||||
|                         if (isAll) { | ||||
|                             this.props.editTable.setTableData(AREA.pickmViewTableArea, res.data[AREA.pickmViewTableArea]); | ||||
| 						} | ||||
| 						else { | ||||
|                         } else { | ||||
|                             let delArray = []; | ||||
|                             let updateArray = []; | ||||
|                             let rows = res.data[AREA.pickmViewTableArea].rows; | ||||
|  | @ -665,6 +641,7 @@ async function delrow(index) { | |||
|         } | ||||
|     }) | ||||
| } | ||||
| 
 | ||||
| //存量查拣
 | ||||
| function onHandBtnClick() { | ||||
|     let selectData = getSelectRows.call(this); | ||||
|  | @ -723,8 +700,7 @@ function getStockAccountNum() { | |||
|     if (!selectedRow || selectedRow.length < 1) { | ||||
|         isAll = true; | ||||
|         tableData = this.props.editTable.getAllRows(getModuleId.call(this)); | ||||
| 	} | ||||
| 	else { | ||||
|     } else { | ||||
|         selectedRow.map((item) => { | ||||
|             tableData.push(item.data); | ||||
|         }); | ||||
|  | @ -739,8 +715,7 @@ function getStockAccountNum() { | |||
|         requestData.tabType = 0; | ||||
|         if (this.state.tabType == BILLTYPE.pickm) { | ||||
|             pageCode = AREA.pickmPageArea; | ||||
| 		} | ||||
| 		else { | ||||
|         } else { | ||||
|             pageCode = AREA.directTransPageArea; | ||||
|         } | ||||
|         if (!pageType) { | ||||
|  | @ -782,7 +757,8 @@ function getStockAccountNum() { | |||
|                 areacode: getModuleId.call(this) | ||||
|             } | ||||
|         } | ||||
| 	}; | ||||
|     } | ||||
|     ; | ||||
|     ajax({ | ||||
|         url: URL.queryIssueObtainStockAccountNum, | ||||
|         data: requestData, | ||||
|  | @ -820,8 +796,7 @@ function getStockAccountNum() { | |||
|                     } | ||||
|                     if (pageType) { | ||||
|                         showSuccessInfo(getLangByResId(this, '50080105-000007')); | ||||
| 					} | ||||
| 					else { | ||||
|                     } else { | ||||
|                         showSuccessInfo(getLangByResId(this, '50090105-000007')); | ||||
|                     } | ||||
|                 } | ||||
|  | @ -895,11 +870,17 @@ function getOnHandData(selectData) { | |||
|             onhandDim.values.crowno = item.values.vrowno; | ||||
|             // 待处理主数量
 | ||||
|             if (item.values.nthisneednum && item.values.nthisneednum.value) { | ||||
| 				onhandDim.values.onhandshouldnum = parseFloat(item.values.nthisneednum.value) > 0 ? item.values.nthisneednum : { value: '0', scale: '2' }; | ||||
|                 onhandDim.values.onhandshouldnum = parseFloat(item.values.nthisneednum.value) > 0 ? item.values.nthisneednum : { | ||||
|                     value: '0', | ||||
|                     scale: '2' | ||||
|                 }; | ||||
|             } | ||||
|             //待处理数量
 | ||||
|             if (item.values.nthisneedastnum && item.values.nthisneedastnum.value) { | ||||
| 				onhandDim.values.onhandshouldassnum = parseFloat(item.values.nthisneedastnum.value) > 0 ? item.values.nthisneedastnum : { value: '0', scale: '2' }; | ||||
|                 onhandDim.values.onhandshouldassnum = parseFloat(item.values.nthisneedastnum.value) > 0 ? item.values.nthisneedastnum : { | ||||
|                     value: '0', | ||||
|                     scale: '2' | ||||
|                 }; | ||||
|             } | ||||
|             //物料辅助属性
 | ||||
|             onhandDim.values.cproductorid = item.values.cbproductorid; | ||||
|  | @ -1026,4 +1007,5 @@ function getOnHandData(selectData) { | |||
|     } | ||||
|     return realRows; | ||||
| } | ||||
| 
 | ||||
| /*9LNhEcWwOPqFwoyI0rg5Tvi1KVVJuZ+O99DtbZayIQc=*/ | ||||
		Loading…
	
		Reference in New Issue