生产订单卡片多选跳转备料计划

This commit is contained in:
李正@用友 2025-06-16 10:38:44 +08:00
parent c2006189c7
commit 141fe50d1d
2 changed files with 26 additions and 20 deletions

View File

@ -4,7 +4,7 @@
* @PageInfo: 备料计划按钮事件
*/
import { PMO_LIST, PMO_CARD, URL, PMO_LIST_BUTTON, PMO_CARD_BUTTON, HEADATTRCODE, BODYATTRCODE } from '../../pmoconst';
import { ajax,pageTo } from 'nc-lightapp-front';
import { ajax, pageTo } from 'nc-lightapp-front';
import { showSuccessInfo, showErrorInfo, showWarningInfo } from '../../../../../mmpub/mmpub/pub/tool/messageUtil';
import { getLangByResId } from '../../../../../mmpub/mmpub/pub/tool/multiLangUtil';
import { bodyCheckedRow, filterBody4Data } from '../util/bodySelectedUtils';
@ -13,14 +13,14 @@ let { openAppByBilltype } = pageTo;
export default function pickm(props, record) {
let checkedRows = bodyCheckedRow.call(this, this.props, record);
if (!record) {
if(checkedRows.length == 0) {
if (checkedRows.length == 0) {
showWarningInfo(getLangByResId(this, '50080000-000038'));/* 国际化处理: 提示,请选择行数据!*/
return;
}
if (checkedRows.length > 1) {
showWarningInfo(getLangByResId(this, '50080000-000039'));/* 国际化处理: 提示,请选择一行数据进行操作!*/
return;
}
// if (checkedRows.length > 1) {
// showWarningInfo(getLangByResId(this, '50080000-000039'));/* 国际化处理: 提示,请选择一行数据进行操作!*/
// return;
// }
}
let data = {};
let ids = [];
@ -35,6 +35,7 @@ export default function pickm(props, record) {
bids.push(bid);
}
});
data[HEADATTRCODE.CPMOHID] = ids;
data[BODYATTRCODE.CMOID] = bids;
ajax({
@ -42,20 +43,25 @@ export default function pickm(props, record) {
data,
success: (res) => {
if (res.success) {
if (res.data && res.data[0]) {
openAppByBilltype({
//billtype: '50080102_card',
billtype: '55A3',
billpk: res.data[0],
type: 'open'
});
// props.openTo(null, {
// pagecode: '50080102_card',
// appcode: '50080102',
// id: res.data[0],
// status: PMO_CARD.browse
// });
//添加选中多行逻辑,多行跳转到列表页面
if (res.data && res.data.length == 0 && res.data[0]) {
openAppByBilltype({
//billtype: '50080102_card',
billtype: '55A3',
billpk: res.data[0],
type: 'open'
});
} else if (res.data && res.data.length > 1 && res.data[1]) {
props.openTo('/nccloud/resources/mmpac/mmpac/pickm/main/index.html#/list', {
appcode: '400802800',
pagecode: '50080102_list',
status: 'browse',
ids: res.data
});
}
}
}
});

View File

@ -41,7 +41,7 @@ export default function pickm(props) {
});
} else if (res.data && res.data.length >= 1 && res.data[0]) {
} else if (res.data && res.data.length >= 1 && res.data[1]) {
props.openTo('/nccloud/resources/mmpac/mmpac/pickm/main/index.html#/list', {
appcode: '400802800',
pagecode: '50080102_list',