采购订单下推委外,只能下推一条
This commit is contained in:
		
							parent
							
								
									34fe1dc962
								
							
						
					
					
						commit
						5104c3133a
					
				|  | @ -43,6 +43,8 @@ import { | |||
| 	payExecStatBtnClick, | ||||
| 	bizInfoBtnClick | ||||
| } from '../btnClicks/index'; | ||||
| import { ajax, toast} from 'nc-lightapp-front'; | ||||
| 
 | ||||
| import { clearTransferCache } from '../../../../../scmpub/scmpub/pub/cache'; | ||||
| import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; | ||||
| import { getDefData } from '../../../../../scmpub/scmpub/pub/cache'; | ||||
|  | @ -309,6 +311,81 @@ export default function(props, key, text, record, index) { | |||
| 		case LIST_BUTTON.Export: | ||||
| 			this.props.modal.show('exportFileModal'); | ||||
| 			break; | ||||
| 		//消息通知
 | ||||
| 		case "Message": | ||||
| 		    let messageData={}; | ||||
| 			ajax({ | ||||
| 				url: '/nccloud/pu/poorder/poOrderMessage.do', | ||||
| 				data: this.messageData, | ||||
| 				async: false, | ||||
| 				success: (res) => { | ||||
| 					if (res.success) { | ||||
| 						 | ||||
| 					} | ||||
| 				} | ||||
| 			}); | ||||
| 			break; | ||||
| 		// case "OrderToScOrder": // 生成委外订单
 | ||||
| 		// 	requestCheckData.call(this, '4006', getLangByResId(this, '4004POORDER-000103'), () => {
 | ||||
| 		// 		// 拼装json
 | ||||
| 		// 		let pushdata = {
 | ||||
| 		// 			closedto: rowsdata,
 | ||||
| 		// 			[FIELD.pagecode]: PAGECODE.listcode,
 | ||||
| 		// 			extstr: 'grid' //列表标识
 | ||||
| 		// 		};
 | ||||
| 		// 		if (pushdata != '' && !(pushdata instanceof Array) && Object.keys(pushdata).length != 0) {
 | ||||
| 		// 			_url = "/nccloud/pu/poorder/pushcoopsaleorderaction.do";
 | ||||
| 		// 			commonClose.call(
 | ||||
| 		// 				this,
 | ||||
| 		// 				_url,
 | ||||
| 		// 				pushdata,
 | ||||
| 		// 				rowindex,
 | ||||
| 		// 				getLangByResId(this, '4004POORDER-000030')
 | ||||
| 		// 			); /* 国际化处理: 生成销售协同订单*/
 | ||||
| 		// 		}
 | ||||
| 		// 	});
 | ||||
| 		// 	break;
 | ||||
| 			case "OrderToScOrder": // 生成委外订单
 | ||||
| 				let billId =  rowsdata[0].pks;//跳转付款申请单
 | ||||
| 				let type = '3601'; | ||||
| 				let indexMap = new Map(); | ||||
| 				let geneinfo = { | ||||
| 					type: type, | ||||
| 					pk: billId, | ||||
| 					pageid: "36070APM_C01", | ||||
| 					indexMap: indexMap, | ||||
| 				}; | ||||
| 				ajax({ | ||||
| 					url: '/nccloud/pu/poorder/pushScOrderCheck.do', | ||||
| 					data: geneinfo, | ||||
| 					async: false, | ||||
| 					success: (res) => { | ||||
| 						if (res.success  ) { | ||||
| 							if(res.data.length == 0){ | ||||
| 								let url ="/sc/sc/scorder/main/index.html#/card"; | ||||
| 								this.props.openTo(url,{ | ||||
| 									scene: "istransfer", | ||||
| 									//应用编码
 | ||||
| 									appcode:"401200000", | ||||
| 									//页面编码
 | ||||
| 									pagecode:"401200000_card", | ||||
| 									//设置页面状态
 | ||||
| 									status: "add", | ||||
| 									//给本次请求设置唯一标识
 | ||||
| 									src: "informerApply", | ||||
| 									//本次请求携带数据,key-vlaue
 | ||||
| 									it_detail_pk: billId | ||||
| 									}) | ||||
| 							}else{ | ||||
| 								toast({ | ||||
| 									color: 'warning', | ||||
| 									content: "该单据已经生成委外订单,请检查!" | ||||
| 								}); | ||||
| 							} | ||||
| 						} | ||||
| 					} | ||||
| 				}); | ||||
| 			break; | ||||
| 		default: | ||||
| 			break; | ||||
| 	} | ||||
|  |  | |||
|  | @ -19,13 +19,50 @@ import { yycBtnInit } from '../../../yyc/ext/yycBtnInit'; | |||
| import { rateTypeSellFilter } from '../../../../../scmpub/scmpub/pub/tool/currencyRateUtil'; | ||||
| import { batchSetHyperlinkForTableFields } from '../../../../../scmpub/scmpub/pub/tool/hyperlinkUtil'; | ||||
| import { isFromApproveCenter } from '../../../pub/utils/approveSceneUtil'; | ||||
| 
 | ||||
| import { ajax} from 'nc-lightapp-front'; | ||||
| export default function(props) { | ||||
| 	//通过获取url参数来判断是否走审批
 | ||||
| 	let _this = this; | ||||
| 	let _props = props; | ||||
| 	//审批中心场景
 | ||||
| 	let approveScene = isFromApproveCenter(props); | ||||
| 	// 在初始化函数中加入以下代码
 | ||||
| 	if (this.props.getUrlParam('src') === 'informerApply') { | ||||
| 		let it_detail_pk = this.props.getUrlParam('it_detail_pk'); // 进口明细推付款申请传给的pk
 | ||||
| 		let type = '3601'; | ||||
| 		let indexMap = new Map(); | ||||
| 		let geneinfo = { | ||||
| 			type: type, | ||||
| 			pk: it_detail_pk, | ||||
| 			pageid: "36070APM_C01", | ||||
| 			indexMap: indexMap, | ||||
| 		}; | ||||
| 		// 调用 ajax 请求,将数据进行转换,并渲染页面数据
 | ||||
| 		ajax({ | ||||
| 			url: "/nccloud/pu/poorder/pushScOrderAction.do", | ||||
| 			data: geneinfo, | ||||
| 			success: (res) => { | ||||
| 				if (res.data) { | ||||
| 					if (res.data.head) { | ||||
| 						// this.props.form.setFormItemsDisabled("401200000_card", { bill_date: true }); // 单据日期
 | ||||
| 						// this.props.form.setFormItemsDisabled("401200000_card", { pk_org_v: true }); // 业务单元
 | ||||
| 						this.props.form.setAllFormValue({[SCORDER_CARD.formId] : res.data.head[SCORDER_CARD.formId]}  ); | ||||
| 						// this.props.form.setAllFormValue({ [this.formId]: res.data.head[this.formId] });
 | ||||
| 					} | ||||
| 					if (res.data.body) { | ||||
| 						this.props.cardTable.setTableData( | ||||
| 							SCORDER_CARD.tableId, | ||||
| 							res.data.body[SCORDER_CARD.tableId] | ||||
| 						); | ||||
| 					} | ||||
| 					this.props.resMetaAfterPkorgEdit(); | ||||
| 				} | ||||
| 			}, | ||||
| 		}); | ||||
| 		// 设置表单和表格为可编辑状态
 | ||||
| 		this.props.cardTable.setStatus(SCORDER_CARD.tableId, "edit"); | ||||
| 		this.props.form.setFormStatus(SCORDER_CARD.formId, "edit"); | ||||
| 	} | ||||
| 	if (approveScene) { | ||||
| 		this.props.createUIDom( | ||||
| 			{ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue