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