备料计划新增推送请购和流程生产订单
This commit is contained in:
parent
dc4af22787
commit
8fb1b294d3
|
@ -16,7 +16,7 @@ import {
|
||||||
|
|
||||||
import listbuttonController from '../viewController/buttonController';
|
import listbuttonController from '../viewController/buttonController';
|
||||||
import { updateCacheDataForList } from '../../../../../mmpub/mmpub/pub/cache';
|
import { updateCacheDataForList } from '../../../../../mmpub/mmpub/pub/cache';
|
||||||
import { ajax, cacheTools } from 'nc-lightapp-front';
|
import { ajax, cacheTools,toast } from 'nc-lightapp-front';
|
||||||
|
|
||||||
export default function (props, key, text, record, index) {
|
export default function (props, key, text, record, index) {
|
||||||
let pk = null;
|
let pk = null;
|
||||||
|
@ -429,6 +429,70 @@ export default function (props, key, text, record, index) {
|
||||||
listbuttonController.initButtons.call(this, this.props);
|
listbuttonController.initButtons.call(this, this.props);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "to_buying"://请购
|
||||||
|
cpickmids = [];
|
||||||
|
if (record && record.cpickmid) {
|
||||||
|
cpickmids.push(record.cpickmid);
|
||||||
|
} else {
|
||||||
|
let rows = _this.props.table.getCheckedRows(AREA.tableArea);
|
||||||
|
// 如果没有选中行,则提示并返回,不进行任何操作
|
||||||
|
if (rows.length <= 0) {
|
||||||
|
showWarningInfo(getLangByResId(this, '5008Pickm-000086')/* 国际化处理: 请选择需要处理的数据!*//*getLangByResId(this, '4004POORDER-000068') 国际化处理: 请选择需要删除的数据!*/
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
rows.forEach((row) => {
|
||||||
|
let pk = row.data.values.cpickmid.value;
|
||||||
|
if (pk) {
|
||||||
|
cpickmids.push(pk);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
data = {
|
||||||
|
cpickmids: cpickmids
|
||||||
|
}
|
||||||
|
ajax({
|
||||||
|
url:'/nccloud/mmpac/pickm/buyingreq.do',
|
||||||
|
data: data,
|
||||||
|
success: (res) => {
|
||||||
|
if(res.success){
|
||||||
|
toast({ content: "请购单推送成功", color: 'success' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "to_pmo"://流程生产订单
|
||||||
|
cpickmids = [];
|
||||||
|
if (record && record.cpickmid) {
|
||||||
|
cpickmids.push(record.cpickmid);
|
||||||
|
} else {
|
||||||
|
let rows = _this.props.table.getCheckedRows(AREA.tableArea);
|
||||||
|
// 如果没有选中行,则提示并返回,不进行任何操作
|
||||||
|
if (rows.length <= 0) {
|
||||||
|
showWarningInfo(getLangByResId(this, '5008Pickm-000086')/* 国际化处理: 请选择需要处理的数据!*//*getLangByResId(this, '4004POORDER-000068') 国际化处理: 请选择需要删除的数据!*/
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
rows.forEach((row) => {
|
||||||
|
let pk = row.data.values.cpickmid.value;
|
||||||
|
if (pk) {
|
||||||
|
cpickmids.push(pk);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
data = {
|
||||||
|
cpickmids: cpickmids
|
||||||
|
}
|
||||||
|
ajax({
|
||||||
|
url: '/nccloud/mmpac/pickm/pom.do',
|
||||||
|
data: data,
|
||||||
|
success: (res) => {
|
||||||
|
if(res.success){
|
||||||
|
toast({ content: "流程生产订单推送成功", color: 'success' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue