借料入库前端调整
This commit is contained in:
parent
498fa57aff
commit
dc4af22787
|
@ -1,34 +1,31 @@
|
||||||
import { ajax, toast } from 'nc-lightapp-front';
|
import {ajax, toast} from 'nc-lightapp-front';
|
||||||
import { AREA, URL, DIALOGCODE, FIELD } from '../../constance';
|
import {AREA, URL, DIALOGCODE, FIELD} from '../../constance';
|
||||||
import { initLang, getLangByResId } from '../../../../../mmpub/mmpub/pub/tool/multiLangUtil';
|
import {initLang, getLangByResId} from '../../../../../mmpub/mmpub/pub/tool/multiLangUtil';
|
||||||
import PickmCLQueryDlg from '../../pickmclquery/list';
|
import PickmCLQueryDlg from '../../pickmclquery/list';
|
||||||
import { showErrorInfo } from '../../../../../mmpub/mmpub/pub/tool/messageUtil';
|
import {showErrorInfo} from '../../../../../mmpub/mmpub/pub/tool/messageUtil';
|
||||||
|
|
||||||
export default function detailqueryBtnClick(props, record) {
|
export default function detailqueryBtnClick(props, record) {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
let bids = [];
|
let bids = [];
|
||||||
let hid;
|
let hid;
|
||||||
if (record && record.values.cpickm_bid && record.values.cpickm_bid.value) {
|
let rows = this.props.cardTable.getCheckedRows(AREA.bodyTable);
|
||||||
bids.push(record.values.cpickm_bid.value);
|
// 如果没有选中行,则提示并返回,不进行任何操作
|
||||||
} else {
|
if (!rows) {
|
||||||
let rows = this.props.cardTable.getCheckedRows(AREA.bodyTable);
|
return;
|
||||||
// 如果没有选中行,则提示并返回,不进行任何操作
|
|
||||||
if (!rows) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (rows.length <= 0) {
|
|
||||||
hid = this.props.form.getFormItemsValue(AREA.formArea, FIELD.hid).value;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
rows.map((item) => {
|
|
||||||
let cpickm_bid = props.cardTable.getValByKeyAndIndex(AREA.bodyTable, item.index, 'cpickm_bid').value;
|
|
||||||
bids.push(cpickm_bid);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
doQuery.call(this, props, hid, bids);
|
if (rows.length <= 0) {
|
||||||
|
hid = this.props.form.getFormItemsValue(AREA.formArea, FIELD.hid).value;
|
||||||
|
} else {
|
||||||
|
rows.map((item) => {
|
||||||
|
let cpickm_bid = props.cardTable.getValByKeyAndIndex(AREA.bodyTable, item.index, 'cpickm_bid').value;
|
||||||
|
bids.push(cpickm_bid);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
doQuery.call(this, props, hid, bids, rows);
|
||||||
|
|
||||||
}
|
}
|
||||||
function doQuery(props, hid, bids) {
|
|
||||||
|
function doQuery(props, hid, bids, rows) {
|
||||||
let appcode = props.getAppCode();
|
let appcode = props.getAppCode();
|
||||||
|
|
||||||
ajax({
|
ajax({
|
||||||
|
@ -40,9 +37,49 @@ function doQuery(props, hid, bids) {
|
||||||
appcode: appcode
|
appcode: appcode
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
props.table.setAllTableData('NCTable_83c3abf9', res.data.clquery);
|
let bids = res.data.data;
|
||||||
// props.table.setAllTableData('NCTable_83c3abf9', res.data.clquery,true, true, false);
|
// console.log('bids = ', bids);
|
||||||
props.modal.show('NCTable_83c3abf9');
|
let rows1 = [];
|
||||||
|
rows.map((item) => {
|
||||||
|
let values = item.data.values;
|
||||||
|
// 借料数量 = 计划出库数量-累计出库数量-累计发货数量-累计委外数量,所有数值用getNumber处理null转0
|
||||||
|
values.borrowedQty = {
|
||||||
|
value: getNumber(values.nplanoutastnum) - getNumber(values.naccoutastnum) -
|
||||||
|
getNumber(values.nshouldastnum) - getNumber(values.npscastnum)
|
||||||
|
};
|
||||||
|
let rowItem = {
|
||||||
|
isOptimized: false,
|
||||||
|
status: '0',
|
||||||
|
values: values
|
||||||
|
};
|
||||||
|
// 确保 bids 是数组类型
|
||||||
|
if (!Array.isArray(bids)) {
|
||||||
|
bids = [bids];
|
||||||
|
}
|
||||||
|
// 筛选出未生成的行
|
||||||
|
// console.log('values.cpickm_bid = ', values.cpickm_bid.value);
|
||||||
|
// console.log('values.indexOf = ', bids.indexOf(values.cpickm_bid.value));
|
||||||
|
if (values.cpickm_bid && values.cpickm_bid.value && (bids.indexOf(values.cpickm_bid.value) > -1)) {
|
||||||
|
rows1.push(rowItem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let data = {
|
||||||
|
areacode: 'clquery',
|
||||||
|
rows: rows1
|
||||||
|
};
|
||||||
|
// console.log('rows = ', rows);
|
||||||
|
// console.log('data = ', data);
|
||||||
|
props.table.setAllTableData(AREA.borrowMaterialDialog, data);
|
||||||
|
props.modal.show(AREA.borrowMaterialDialog);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 本地安全数值转换方法,null/undefined/空对象转0
|
||||||
|
function getNumber(data) {
|
||||||
|
if (data && data.value != null) {
|
||||||
|
return +data.value;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,359 +1,364 @@
|
||||||
import React, { Component } from 'react';
|
import React, {Component} from 'react';
|
||||||
import { createPage, ajax, base, high, toast } from 'nc-lightapp-front';
|
import {createPage, ajax, base, high, toast} from 'nc-lightapp-front';
|
||||||
import ApproveDetail from 'uap/common/components/ApproveDetail';
|
import ApproveDetail from 'uap/common/components/ApproveDetail';
|
||||||
import NCUploader from 'uap/common/components/NCUploader';
|
import NCUploader from 'uap/common/components/NCUploader';
|
||||||
import ApprovalTrans from 'uap/common/components/approvalTrans';
|
import ApprovalTrans from 'uap/common/components/approvalTrans';
|
||||||
const { BillTrack } = high;
|
|
||||||
import { initTemplate } from './init';
|
const {BillTrack} = high;
|
||||||
import { pageInfoClick, pageInfoClickPage, getParentURlParme } from './btnClicks';
|
import {initTemplate} from './init';
|
||||||
|
import {pageInfoClick, pageInfoClickPage, getParentURlParme} from './btnClicks';
|
||||||
import newLineDefaultUtil from './utils/newLineDefaultUtil';
|
import newLineDefaultUtil from './utils/newLineDefaultUtil';
|
||||||
import { checkDeleteRows } from './utils/rowDeleteUtil';
|
import {checkDeleteRows} from './utils/rowDeleteUtil';
|
||||||
import { btnClickController, buttonController } from './viewController/index';
|
import {btnClickController, buttonController} from './viewController/index';
|
||||||
import { FIELD, BTNID, URL, PAGECARDCODE, UISTATE, AREA, CARD_BTN, PickmCache, FbillStatus } from '../constance';
|
import {FIELD, BTNID, URL, PAGECARDCODE, UISTATE, AREA, CARD_BTN, PickmCache, FbillStatus} from '../constance';
|
||||||
import { headAfterEvent, bodyAfterEvent } from './afterEvents';
|
import {headAfterEvent, bodyAfterEvent} from './afterEvents';
|
||||||
import { batchEvent } from './batchEvents';
|
import {batchEvent} from './batchEvents';
|
||||||
import { headBeforeEvent, bodyBeforeEvent } from './beforeEvents';
|
import {headBeforeEvent, bodyBeforeEvent} from './beforeEvents';
|
||||||
import saveCommitBtnClick from './btnClicks/saveCommitBtnClick';
|
import saveCommitBtnClick from './btnClicks/saveCommitBtnClick';
|
||||||
import commitBtnClick from './btnClicks/commitBtnClick'; //提交
|
import commitBtnClick from './btnClicks/commitBtnClick'; //提交
|
||||||
const { NCFormControl, NCAffix, NCDiv, NCIcon, NCUpload, NCBackBtn } = base;
|
const {NCFormControl, NCAffix, NCDiv, NCIcon, NCUpload, NCBackBtn} = base;
|
||||||
import { RownoUtils } from '../../../../mmpub/mmpub/pub/tool/cardTableTools';
|
import {RownoUtils} from '../../../../mmpub/mmpub/pub/tool/cardTableTools';
|
||||||
import { initLang, getLangByResId } from '../../../../mmpub/mmpub/pub/tool/multiLangUtil';
|
import {initLang, getLangByResId} from '../../../../mmpub/mmpub/pub/tool/multiLangUtil';
|
||||||
import { BillReserve } from 'ic/ic/components/billReserve'; //预留
|
import {BillReserve} from 'ic/ic/components/billReserve'; //预留
|
||||||
import ReserveQuery from 'ic/ic/components/reserveQuery'; //预留查询
|
import ReserveQuery from 'ic/ic/components/reserveQuery'; //预留查询
|
||||||
import inputChange from '../../../../mmpub/mmpub/pub/tool/rownoInputUtil';
|
import inputChange from '../../../../mmpub/mmpub/pub/tool/rownoInputUtil';
|
||||||
|
import {showWarningInfo} from "../../../../mmpub/mmpub/pub/tool/messageUtil";
|
||||||
|
|
||||||
let param = getParentURlParme('pageMsgType');
|
let param = getParentURlParme('pageMsgType');
|
||||||
|
|
||||||
class PickmCard extends Component {
|
class PickmCard extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
props.use.form(AREA.formArea);
|
props.use.form(AREA.formArea);
|
||||||
props.use.cardTable(AREA.bodyTable);
|
props.use.cardTable(AREA.bodyTable);
|
||||||
//this.meta;
|
//this.meta;
|
||||||
this.billcode = '';
|
this.billcode = '';
|
||||||
this.MM_PICKM_TYPE = 'N'; //判断是否是从新增小应用过来的
|
this.MM_PICKM_TYPE = 'N'; //判断是否是从新增小应用过来的
|
||||||
this.state = {
|
this.state = {
|
||||||
copy_billId: '',
|
copy_billId: '',
|
||||||
hideAdd: false,
|
hideAdd: false,
|
||||||
hideDel: false,
|
hideDel: false,
|
||||||
copyRowDatas: null, //复制行数据
|
copyRowDatas: null, //复制行数据
|
||||||
showTrack: false, //单据追溯
|
showTrack: false, //单据追溯
|
||||||
show: false, //审批详情
|
show: false, //审批详情
|
||||||
vtrantypecode: null,
|
vtrantypecode: null,
|
||||||
cpickmid: '',
|
cpickmid: '',
|
||||||
lineShowType: [], //通过数组的方式控制 列按钮显示 1-收起 0-展开
|
lineShowType: [], //通过数组的方式控制 列按钮显示 1-收起 0-展开
|
||||||
target: null, //附件管理弹出框目标位置
|
target: null, //附件管理弹出框目标位置
|
||||||
showUploader: false, //是否显示附件管理弹出框
|
showUploader: false, //是否显示附件管理弹出框
|
||||||
tableData: { rows: [] },
|
tableData: {rows: []},
|
||||||
refreshFlag: 0,
|
refreshFlag: 0,
|
||||||
editable: false, //页面是否可以编辑
|
editable: false, //页面是否可以编辑
|
||||||
status: UISTATE.browse, // 页面标志,默认浏览态
|
status: UISTATE.browse, // 页面标志,默认浏览态
|
||||||
compositedisplay: false,
|
compositedisplay: false,
|
||||||
compositedata: null,
|
compositedata: null,
|
||||||
saveAndCommit: false, //是否保存提交
|
saveAndCommit: false, //是否保存提交
|
||||||
isUpdateForYL: null,
|
isUpdateForYL: null,
|
||||||
skipCodes: null,
|
skipCodes: null,
|
||||||
isWW: false,
|
isWW: false,
|
||||||
showReserve: false, //是否显示预留弹框
|
showReserve: false, //是否显示预留弹框
|
||||||
showReserveQuery: false, //是否显示预留查询
|
showReserveQuery: false, //是否显示预留查询
|
||||||
};
|
};
|
||||||
this.reserveData = {}; //预留需要的数据
|
this.reserveData = {}; //预留需要的数据
|
||||||
this.reserveQueryPks = {}; //预留查询需要的数据
|
this.reserveQueryPks = {}; //预留查询需要的数据
|
||||||
//initTemplate.call(this, this.props);
|
//initTemplate.call(this, this.props);
|
||||||
initLang(this, ['5008Pickm', '5008Pub'], 'mmpac', initTemplate.bind(this, this.props));
|
initLang(this, ['5008Pickm', '5008Pub'], 'mmpac', initTemplate.bind(this, this.props));
|
||||||
}
|
}
|
||||||
// 渲染页面前,执行
|
|
||||||
componentWillMount() {
|
|
||||||
// 关闭浏览器
|
|
||||||
window.onbeforeunload = () => {
|
|
||||||
let status = this.props.cardTable.getStatus(AREA.bodyTable);
|
|
||||||
//if (!status) status == 'browse';
|
|
||||||
status = status == 'browse' ? 'browse' : 'edit';
|
|
||||||
if (status == 'edit') {
|
|
||||||
return getLangByResId(this, '5008Pickm-000052');/* 国际化处理: 当前单据未保存,您确认离开此页面?*//*getLangByResId(this, '4008GENERALIN-000006'); 国际化处理: 当前单据未保存,您确认离开此页面?*/
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
componentDidMount() {
|
|
||||||
//设置状态
|
|
||||||
this.props.BillHeadInfo.setBillHeadInfoVisible({
|
|
||||||
showBackBtn: false, //控制显示返回按钮: true为显示,false为隐藏 ---非必传
|
|
||||||
showBillCode: false, //控制显示单据号:true为显示,false为隐藏 ---非必传
|
|
||||||
billCode: this.state.vbillcode //修改单据号---非必传
|
|
||||||
});
|
|
||||||
//pageInfoClick.bind(this)();
|
|
||||||
}
|
|
||||||
closeApprove = () => {
|
|
||||||
this.setState({
|
|
||||||
show: false
|
|
||||||
});
|
|
||||||
};
|
|
||||||
// 附件管理关闭
|
|
||||||
onHideUploader = () => {
|
|
||||||
this.setState({
|
|
||||||
showUploader: false
|
|
||||||
});
|
|
||||||
};
|
|
||||||
//切换页面状态
|
|
||||||
toggleShow = () => {
|
|
||||||
let status = this.props.getUrlParam('status');
|
|
||||||
if (!status) {
|
|
||||||
status = 'add';
|
|
||||||
}
|
|
||||||
buttonController.setUIState.call(this, this.props, status);
|
|
||||||
buttonController.setBackButtonVisiable.call(this, this.props, param);
|
|
||||||
buttonController.setCardButtonVisiable.call(this, this.props, status, param);
|
|
||||||
};
|
|
||||||
//获取列表肩部信息
|
|
||||||
getTableHead = (buttons) => {
|
|
||||||
return (
|
|
||||||
<div className='definition-icons'>
|
|
||||||
{this.props.button.createButtonApp({
|
|
||||||
area: AREA.cardBodyBtnArea,
|
|
||||||
//ignoreHotkeyCode: this.getCardDisableHotKeyBtn,
|
|
||||||
onButtonClick: btnClickController.bind(this)
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
getCardDisableHotKeyBtn = () => {
|
|
||||||
return ['DeleteLine']; /** 目前是仅有删除行 */
|
|
||||||
};
|
|
||||||
getAssginUsedr = (value) => {
|
|
||||||
//重新执行提交操作重新执行提交操作
|
|
||||||
if (this.state.saveAndCommit == true) {
|
|
||||||
saveCommitBtnClick.call(this, this.props, this.state.skipCodes, this.state.isUpdateForYL, value);
|
|
||||||
} else {
|
|
||||||
commitBtnClick.call(this, this.props, value);
|
|
||||||
}
|
|
||||||
this.setState({ compositedisplay: false, saveAndCommit: false });
|
|
||||||
};
|
|
||||||
|
|
||||||
change = (data) => {
|
// 渲染页面前,执行
|
||||||
console.log(data);
|
componentWillMount() {
|
||||||
};
|
// 关闭浏览器
|
||||||
|
window.onbeforeunload = () => {
|
||||||
|
let status = this.props.cardTable.getStatus(AREA.bodyTable);
|
||||||
|
//if (!status) status == 'browse';
|
||||||
|
status = status == 'browse' ? 'browse' : 'edit';
|
||||||
|
if (status == 'edit') {
|
||||||
|
return getLangByResId(this, '5008Pickm-000052');/* 国际化处理: 当前单据未保存,您确认离开此页面?*//*getLangByResId(this, '4008GENERALIN-000006'); 国际化处理: 当前单据未保存,您确认离开此页面?*/
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
componentDidMount() {
|
||||||
const { createBillHeadInfo } = this.props.BillHeadInfo;
|
//设置状态
|
||||||
let { table, cardTable, form, button, modal, cardPagination, socket } = this.props;
|
this.props.BillHeadInfo.setBillHeadInfoVisible({
|
||||||
let buttons = this.props.button.getButtons();
|
showBackBtn: false, //控制显示返回按钮: true为显示,false为隐藏 ---非必传
|
||||||
let multiLang = this.props.MutiInit.getIntl(this.moduleId);
|
showBillCode: false, //控制显示单据号:true为显示,false为隐藏 ---非必传
|
||||||
let { createForm } = form;
|
billCode: this.state.vbillcode //修改单据号---非必传
|
||||||
let { createCardTable } = cardTable;
|
});
|
||||||
let { createModal } = modal;
|
//pageInfoClick.bind(this)();
|
||||||
let { createSimpleTable } = table;
|
}
|
||||||
const { createCardPagination } = cardPagination;
|
|
||||||
let { showUploader, target } = this.state;
|
|
||||||
|
|
||||||
// this.props.use.form('NCTable_83c3abf9')
|
closeApprove = () => {
|
||||||
// this.props.form.setFormStatus('NCTable_83c3abf9', 'edit')
|
this.setState({
|
||||||
return (
|
show: false
|
||||||
<div className='nc-bill-card' id='mm-mmpac-pickm-card' >
|
});
|
||||||
{socket.connectMesg({
|
};
|
||||||
headBtnAreaCode: AREA.cardHeadBtnArea, // 表头按钮区域ID
|
// 附件管理关闭
|
||||||
formAreaCode: AREA.formArea, // 表头Form区域ID
|
onHideUploader = () => {
|
||||||
billtype: FIELD.billtype,
|
this.setState({
|
||||||
billpkname: FIELD.hid,
|
showUploader: false
|
||||||
dataSource: PickmCache.PickmCacheKey
|
});
|
||||||
})}
|
};
|
||||||
<div className='nc-bill-top-area'>
|
//切换页面状态
|
||||||
<NCAffix>
|
toggleShow = () => {
|
||||||
<NCDiv areaCode={NCDiv.config.HEADER} className='nc-bill-header-area'>
|
let status = this.props.getUrlParam('status');
|
||||||
<div className='header-title-search-area'>
|
if (!status) {
|
||||||
|
status = 'add';
|
||||||
|
}
|
||||||
|
buttonController.setUIState.call(this, this.props, status);
|
||||||
|
buttonController.setBackButtonVisiable.call(this, this.props, param);
|
||||||
|
buttonController.setCardButtonVisiable.call(this, this.props, status, param);
|
||||||
|
};
|
||||||
|
//获取列表肩部信息
|
||||||
|
getTableHead = (buttons) => {
|
||||||
|
return (
|
||||||
|
<div className='definition-icons'>
|
||||||
|
{this.props.button.createButtonApp({
|
||||||
|
area: AREA.cardBodyBtnArea,
|
||||||
|
//ignoreHotkeyCode: this.getCardDisableHotKeyBtn,
|
||||||
|
onButtonClick: btnClickController.bind(this)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
getCardDisableHotKeyBtn = () => {
|
||||||
|
return ['DeleteLine']; /** 目前是仅有删除行 */
|
||||||
|
};
|
||||||
|
getAssginUsedr = (value) => {
|
||||||
|
//重新执行提交操作重新执行提交操作
|
||||||
|
if (this.state.saveAndCommit == true) {
|
||||||
|
saveCommitBtnClick.call(this, this.props, this.state.skipCodes, this.state.isUpdateForYL, value);
|
||||||
|
} else {
|
||||||
|
commitBtnClick.call(this, this.props, value);
|
||||||
|
}
|
||||||
|
this.setState({compositedisplay: false, saveAndCommit: false});
|
||||||
|
};
|
||||||
|
|
||||||
|
change = (data) => {
|
||||||
|
console.log(data);
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {createBillHeadInfo} = this.props.BillHeadInfo;
|
||||||
|
let {table, cardTable, form, button, modal, cardPagination, socket} = this.props;
|
||||||
|
let buttons = this.props.button.getButtons();
|
||||||
|
let multiLang = this.props.MutiInit.getIntl(this.moduleId);
|
||||||
|
let {createForm} = form;
|
||||||
|
let {createCardTable} = cardTable;
|
||||||
|
let {createModal} = modal;
|
||||||
|
let {createSimpleTable} = table;
|
||||||
|
const {createCardPagination} = cardPagination;
|
||||||
|
let {showUploader, target} = this.state;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className='nc-bill-card' id='mm-mmpac-pickm-card'>
|
||||||
|
{socket.connectMesg({
|
||||||
|
headBtnAreaCode: AREA.cardHeadBtnArea, // 表头按钮区域ID
|
||||||
|
formAreaCode: AREA.formArea, // 表头Form区域ID
|
||||||
|
billtype: FIELD.billtype,
|
||||||
|
billpkname: FIELD.hid,
|
||||||
|
dataSource: PickmCache.PickmCacheKey
|
||||||
|
})}
|
||||||
|
<div className='nc-bill-top-area'>
|
||||||
|
<NCAffix>
|
||||||
|
<NCDiv areaCode={NCDiv.config.HEADER} className='nc-bill-header-area'>
|
||||||
|
<div className='header-title-search-area'>
|
||||||
<span>
|
<span>
|
||||||
{createBillHeadInfo({
|
{createBillHeadInfo({
|
||||||
title: this.props.getSearchParam('n'),//getLangByResId(this, '5008Pickm-000053'),/* 国际化处理: 备料计划*/
|
title: this.props.getSearchParam('n'),//getLangByResId(this, '5008Pickm-000053'),/* 国际化处理: 备料计划*/
|
||||||
backBtnClick: () => {
|
backBtnClick: () => {
|
||||||
//返回按钮的点击事件
|
//返回按钮的点击事件
|
||||||
btnClickController.bind(this, this.props, CARD_BTN.Back)();
|
btnClickController.bind(this, this.props, CARD_BTN.Back)();
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className='header-button-area'>
|
<div className='header-button-area'>
|
||||||
{/*sagas*/}
|
{/*sagas*/}
|
||||||
{this.props.button.createErrorFlag({
|
{this.props.button.createErrorFlag({
|
||||||
headBtnAreaCode: AREA.cardHeadBtnArea
|
headBtnAreaCode: AREA.cardHeadBtnArea
|
||||||
})}
|
})}
|
||||||
{this.props.button.createButtonApp({
|
{this.props.button.createButtonApp({
|
||||||
area: AREA.cardHeadBtnArea,
|
area: AREA.cardHeadBtnArea,
|
||||||
onButtonClick: btnClickController.bind(this)
|
onButtonClick: btnClickController.bind(this)
|
||||||
})}
|
})}
|
||||||
<BillTrack
|
<BillTrack
|
||||||
show={this.state.showTrack}
|
show={this.state.showTrack}
|
||||||
close={() => {
|
close={() => {
|
||||||
this.setState({ showTrack: false });
|
this.setState({showTrack: false});
|
||||||
}}
|
}}
|
||||||
pk={this.state.cpickmid}
|
pk={this.state.cpickmid}
|
||||||
type={FIELD.billtype}
|
type={FIELD.billtype}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{this.state.status == UISTATE.browse ? (
|
{this.state.status == UISTATE.browse ? (
|
||||||
<div className='header-cardPagination-area'>
|
<div className='header-cardPagination-area'>
|
||||||
{createCardPagination({
|
{createCardPagination({
|
||||||
handlePageInfoChange: pageInfoClickPage.bind(this),
|
handlePageInfoChange: pageInfoClickPage.bind(this),
|
||||||
dataSource: PickmCache.PickmCacheKey
|
dataSource: PickmCache.PickmCacheKey
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
</NCDiv>
|
</NCDiv>
|
||||||
</NCAffix>
|
</NCAffix>
|
||||||
<div className='nc-bill-form-area'>
|
<div className='nc-bill-form-area'>
|
||||||
{createForm(AREA.formArea, {
|
{createForm(AREA.formArea, {
|
||||||
onBeforeEvent: headBeforeEvent.bind(this),
|
onBeforeEvent: headBeforeEvent.bind(this),
|
||||||
onAfterEvent: headAfterEvent.bind(this)
|
onAfterEvent: headAfterEvent.bind(this)
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='nc-bill-bottom-area'>
|
<div className='nc-bill-bottom-area'>
|
||||||
<div className='nc-bill-table-area'>
|
<div className='nc-bill-table-area'>
|
||||||
{createCardTable(AREA.bodyTable, {
|
{createCardTable(AREA.bodyTable, {
|
||||||
showCheck: true,
|
showCheck: true,
|
||||||
showIndex: true,
|
showIndex: true,
|
||||||
onBeforeEvent: bodyBeforeEvent.bind(this),
|
onBeforeEvent: bodyBeforeEvent.bind(this),
|
||||||
onAfterEvent: bodyAfterEvent.bind(this),
|
onAfterEvent: bodyAfterEvent.bind(this),
|
||||||
onBatchChange: batchEvent.bind(this),
|
onBatchChange: batchEvent.bind(this),
|
||||||
onSelected: buttonController.lineSelected.bind(this),
|
onSelected: buttonController.lineSelected.bind(this),
|
||||||
hideModelSave: true,
|
hideModelSave: true,
|
||||||
onSelectedAll: buttonController.lineSelected.bind(this),
|
onSelectedAll: buttonController.lineSelected.bind(this),
|
||||||
onBatchSelected: buttonController.lineSelected.bind(this),
|
onBatchSelected: buttonController.lineSelected.bind(this),
|
||||||
tableHead: this.getTableHead.bind(this, buttons),
|
tableHead: this.getTableHead.bind(this, buttons),
|
||||||
adaptionHeight: true,
|
adaptionHeight: true,
|
||||||
inputChange: inputChange.bind(this, FIELD.vrowno),
|
inputChange: inputChange.bind(this, FIELD.vrowno),
|
||||||
modelAddRow: () => {
|
modelAddRow: () => {
|
||||||
//this.props.cardTable.addRow(AREA.bodyTable);
|
//this.props.cardTable.addRow(AREA.bodyTable);
|
||||||
let rowcount = this.props.cardTable.getNumberOfRows(AREA.bodyTable);
|
let rowcount = this.props.cardTable.getNumberOfRows(AREA.bodyTable);
|
||||||
RownoUtils.setRowNo(this.props, AREA.bodyTable, FIELD.vrowno);
|
RownoUtils.setRowNo(this.props, AREA.bodyTable, FIELD.vrowno);
|
||||||
newLineDefaultUtil.setDefault.call(this, this.props, AREA.bodyTable, rowcount - 1);
|
newLineDefaultUtil.setDefault.call(this, this.props, AREA.bodyTable, rowcount - 1);
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
modelDelRowBefore: (props, moduleId, modelIndex, record) => {
|
modelDelRowBefore: (props, moduleId, modelIndex, record) => {
|
||||||
return checkDeleteRows.call(this, [record]);
|
return checkDeleteRows.call(this, [record]);
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* 展示审批详情 */}
|
{/* 展示审批详情 */}
|
||||||
<div>
|
<div>
|
||||||
<ApproveDetail
|
<ApproveDetail
|
||||||
show={this.state.show}
|
show={this.state.show}
|
||||||
close={this.closeApprove}
|
close={this.closeApprove}
|
||||||
billtype={this.state.vtrantypecode}
|
billtype={this.state.vtrantypecode}
|
||||||
billid={this.state.cpickmid}
|
billid={this.state.cpickmid}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>{/* 指派 */}
|
<div>{/* 指派 */}
|
||||||
{this.state.compositedisplay && <ApprovalTrans
|
{this.state.compositedisplay && <ApprovalTrans
|
||||||
title={getLangByResId(this, '5008Pickm-000090')}
|
title={getLangByResId(this, '5008Pickm-000090')}
|
||||||
data={this.state.compositedata}
|
data={this.state.compositedata}
|
||||||
display={this.state.compositedisplay}
|
display={this.state.compositedisplay}
|
||||||
getResult={this.getAssginUsedr.bind(this)}
|
getResult={this.getAssginUsedr.bind(this)}
|
||||||
cancel={() => {
|
cancel={() => {
|
||||||
this.setState({ compositedisplay: false });
|
this.setState({compositedisplay: false});
|
||||||
}}
|
}}
|
||||||
/>}
|
/>}
|
||||||
</div>
|
</div>
|
||||||
<div>{showUploader && <NCUploader billId={this.state.cpickmid} onHide={this.onHideUploader} />}</div>
|
<div>{showUploader && <NCUploader billId={this.state.cpickmid} onHide={this.onHideUploader}/>}</div>
|
||||||
{createModal('orgChange')}
|
{createModal('orgChange')}
|
||||||
{createModal('ResumeMessageDlg', {
|
{createModal('ResumeMessageDlg', {
|
||||||
className: 'iframe-modal',
|
className: 'iframe-modal',
|
||||||
size: 'xlg'
|
size: 'xlg'
|
||||||
})}
|
})}
|
||||||
{createModal('delModal')}
|
{createModal('delModal')}
|
||||||
{createModal('MessageDlg', { zIndex: "280" })}
|
{createModal('MessageDlg', {zIndex: "280"})}
|
||||||
{createModal('SetDeliverDlg')}
|
{createModal('SetDeliverDlg')}
|
||||||
{createModal('BackDeliverDlg', { zIndex: "280" })}
|
{createModal('BackDeliverDlg', {zIndex: "280"})}
|
||||||
{createModal('BackSerialnoDlg', { zIndex: "300" })}
|
{createModal('BackSerialnoDlg', {zIndex: "300"})}
|
||||||
{createModal('TakeOverDlg', { zIndex: "300" })}
|
{createModal('TakeOverDlg', {zIndex: "300"})}
|
||||||
{createModal('SetBackDeliverDlg', { zIndex: "280" })}
|
{createModal('SetBackDeliverDlg', {zIndex: "280"})}
|
||||||
{createModal('ReplaceDlg', { zIndex: "300" })}
|
{createModal('ReplaceDlg', {zIndex: "300"})}
|
||||||
|
|
||||||
{createModal('NCTable_83c3abf9', {
|
{createModal(AREA.borrowMaterialDialog, {
|
||||||
title: '备料明细',
|
title: '借料入库明细',
|
||||||
content: (
|
content: (
|
||||||
<div class="flex-container" style={{ height: '100%' }}>
|
<div class="flex-container" style={{height: '100%'}}>
|
||||||
{createSimpleTable("NCTable_83c3abf9", { showIndex: true })}</div>
|
{createSimpleTable(AREA.borrowMaterialDialog, {showIndex: true})}</div>
|
||||||
),
|
),
|
||||||
size: '500',
|
size: 'xlg',
|
||||||
beSureBtnClick: () => {
|
beSureBtnClick: () => {
|
||||||
let rowids = [];
|
let rowids = [];
|
||||||
let hids = [];
|
let hids = [];
|
||||||
let hid;
|
let hid;
|
||||||
let rows = this.props.cardTable.getCheckedRows(AREA.bodyTable);
|
let rows = this.props.cardTable.getCheckedRows(AREA.bodyTable);
|
||||||
hid = this.props.form.getFormItemsValue(AREA.formArea, FIELD.hid).value;
|
hid = this.props.form.getFormItemsValue(AREA.formArea, FIELD.hid).value;
|
||||||
hids.push(hid);
|
hids.push(hid);
|
||||||
// 如果没有选中行,则提示并返回,不进行任何操作
|
// 如果没有选中行,则提示并返回,不进行任何操作
|
||||||
if (!rows || rows.length <= 0) {
|
if (!rows || rows.length <= 0) {
|
||||||
hids.push(this.props.form.getFormItemsValue(AREA.formArea, FIELD.hid).value);
|
showWarningInfo('请选择行');
|
||||||
}
|
return;
|
||||||
else {
|
}
|
||||||
rows.map((item) => {
|
rows.map((item) => {
|
||||||
let cpickm_bid = this.props.cardTable.getValByKeyAndIndex(AREA.bodyTable, item.index, 'cpickm_bid').value;
|
let cpickm_bid = this.props.cardTable.getValByKeyAndIndex(AREA.bodyTable, item.index, FIELD.bid).value;
|
||||||
rowids.push(cpickm_bid);
|
rowids.push(cpickm_bid);
|
||||||
});
|
});
|
||||||
}
|
let data = {
|
||||||
let data = {
|
cpickmids: hids,
|
||||||
cpickmids: hids,
|
cpickmbids: rowids
|
||||||
cpickmbids: rowids
|
}
|
||||||
}
|
console.log('data = ', data);
|
||||||
ajax({
|
ajax({
|
||||||
url: URL.convertOtherIn,
|
url: URL.convertOtherIn,
|
||||||
data: data,
|
data: data,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
toast({ color: 'success', title: "推送成功" });
|
toast({color: 'success', title: "推送成功"});
|
||||||
this.props.modal.close('NCTable_83c3abf9');
|
this.props.modal.close(AREA.borrowMaterialDialog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
cancelBtnClick: () => {
|
cancelBtnClick: () => {
|
||||||
this.props.modal.close('NCTable_83c3abf9')
|
this.props.modal.close(AREA.borrowMaterialDialog)
|
||||||
},
|
},
|
||||||
userControl: true
|
userControl: true
|
||||||
})}
|
})}
|
||||||
<div>
|
<div>
|
||||||
<ReserveQuery
|
<ReserveQuery
|
||||||
show={this.state.showReserveQuery}
|
show={this.state.showReserveQuery}
|
||||||
pks={this.reserveQueryPks}
|
pks={this.reserveQueryPks}
|
||||||
onClose={() => {
|
onClose={() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
showReserveQuery: false
|
showReserveQuery: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<BillReserve
|
<BillReserve
|
||||||
show={this.state.showReserve}
|
show={this.state.showReserve}
|
||||||
data={this.reserveData}
|
data={this.reserveData}
|
||||||
billType={'55A3'}
|
billType={'55A3'}
|
||||||
onClose={() => {
|
onClose={() => {
|
||||||
this.setState({ showReserve: false });
|
this.setState({showReserve: false});
|
||||||
}}
|
}}
|
||||||
onSave={() => {
|
onSave={() => {
|
||||||
this.setState(
|
this.setState(
|
||||||
{ showReserve: false },
|
{showReserve: false},
|
||||||
//调用刷新
|
//调用刷新
|
||||||
btnClickController.bind(this, this.props, 'Refresh')
|
btnClickController.bind(this, this.props, 'Refresh')
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PickmCard = createPage({
|
PickmCard = createPage({
|
||||||
billinfo: {
|
billinfo: {
|
||||||
billtype: 'card',
|
billtype: 'card',
|
||||||
pagecode: PAGECARDCODE,
|
pagecode: PAGECARDCODE,
|
||||||
headcode: AREA.formArea,
|
headcode: AREA.formArea,
|
||||||
bodycode: AREA.bodyTable
|
bodycode: AREA.bodyTable
|
||||||
},
|
},
|
||||||
orderOfHotKey: [AREA.formArea, AREA.bodyTable]
|
orderOfHotKey: [AREA.formArea, AREA.bodyTable]
|
||||||
})(PickmCard);
|
})(PickmCard);
|
||||||
export default PickmCard;
|
export default PickmCard;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -9,7 +9,8 @@ const AREA = {
|
||||||
listInnerBtnArea: 'list_inner', //列表操作列按钮区域
|
listInnerBtnArea: 'list_inner', //列表操作列按钮区域
|
||||||
cardHeadBtnArea: 'card_head', //卡片表头按钮区域
|
cardHeadBtnArea: 'card_head', //卡片表头按钮区域
|
||||||
cardBodyBtnArea: 'card_body', //卡片表体按钮区域
|
cardBodyBtnArea: 'card_body', //卡片表体按钮区域
|
||||||
cardBodyInnerBtnArea: 'card_body_inner' //卡片表体操作按钮区域
|
cardBodyInnerBtnArea: 'card_body_inner', //卡片表体操作按钮区域
|
||||||
|
borrowMaterialDialog: 'NCTable_83c3abf9' //借料弹窗
|
||||||
};
|
};
|
||||||
const MANUFACTURE = 'fa';//製造場景
|
const MANUFACTURE = 'fa';//製造場景
|
||||||
|
|
||||||
|
|
|
@ -104,5 +104,6 @@
|
||||||
"5008Pickm-000102": "确定",
|
"5008Pickm-000102": "确定",
|
||||||
"5008Pickm-000103": "自动匹配",
|
"5008Pickm-000103": "自动匹配",
|
||||||
"5008Pickm-000104": "自动匹配成功",
|
"5008Pickm-000104": "自动匹配成功",
|
||||||
"5008Pickm-000105": "是替代料的非关键料行,不可删除"
|
"5008Pickm-000105": "是替代料的非关键料行,不可删除",
|
||||||
|
"5008Pickm-000106": "借料数量必须大于0,请检查对应行数据"
|
||||||
}
|
}
|
Loading…
Reference in New Issue