备料计划推送其他入库
This commit is contained in:
parent
b54b0f0f65
commit
9a9b2b563d
|
@ -0,0 +1,48 @@
|
|||
import { ajax, toast } from 'nc-lightapp-front';
|
||||
import { AREA, URL, DIALOGCODE, FIELD } from '../../constance';
|
||||
import { initLang, getLangByResId } from '../../../../../mmpub/mmpub/pub/tool/multiLangUtil';
|
||||
import PickmCLQueryDlg from '../../pickmclquery/list';
|
||||
import { showErrorInfo } from '../../../../../mmpub/mmpub/pub/tool/messageUtil';
|
||||
export default function detailqueryBtnClick(props, record) {
|
||||
let _this = this;
|
||||
let bids = [];
|
||||
let hid;
|
||||
if (record && record.values.cpickm_bid && record.values.cpickm_bid.value) {
|
||||
bids.push(record.values.cpickm_bid.value);
|
||||
} else {
|
||||
let rows = this.props.cardTable.getCheckedRows(AREA.bodyTable);
|
||||
// 如果没有选中行,则提示并返回,不进行任何操作
|
||||
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);
|
||||
}
|
||||
function doQuery(props, hid, bids) {
|
||||
let appcode = props.getAppCode();
|
||||
|
||||
ajax({
|
||||
url: '/nccloud/mmpac/pickm/pickmItemsQuery.do',
|
||||
data: {
|
||||
cpickmid: hid,
|
||||
cpickmbids: bids,
|
||||
pageid: DIALOGCODE.CLQUERYDLG,
|
||||
appcode: appcode
|
||||
},
|
||||
success: res => {
|
||||
props.table.setAllTableData('NCTable_83c3abf9', res.data.clquery);
|
||||
// props.table.setAllTableData('NCTable_83c3abf9', res.data.clquery,true, true, false);
|
||||
props.modal.show('NCTable_83c3abf9');
|
||||
}
|
||||
});
|
||||
}
|
|
@ -22,10 +22,11 @@ import clqueryBtnClick from './clqueryBtnClick';//存量查询
|
|||
import replaceBtnClick from './replaceBtnClick';
|
||||
import reserveBtnClick from './reserveBtnClick';
|
||||
import reserveQueryBtnClick from './reserveQueryBtnClick';
|
||||
import detailqueryBtnClick from './detailqueryBtnClick';
|
||||
export {
|
||||
pageInfoClick, getParentURlParme, setBtnShow, backBtnClick, addBtnClick, delBtnClick,
|
||||
editBtnClick, cancelBtnClick, saveBtnClick, saveCommitBtnClick, copyBtnClick,
|
||||
commitBtnClick, unCommitBtnClick, printBtnClick, outputBtnClick, subItemsBtnClick,
|
||||
finishBtnClick, unfinishBtnClick, clqueryBtnClick, replaceBtnClick,reserveBtnClick,reserveQueryBtnClick,
|
||||
finishBtnClick, unfinishBtnClick, clqueryBtnClick, replaceBtnClick,reserveBtnClick,reserveQueryBtnClick,detailqueryBtnClick,
|
||||
pageInfoClickPage
|
||||
};
|
||||
|
|
|
@ -134,15 +134,18 @@ class PickmCard extends Component {
|
|||
|
||||
render() {
|
||||
const { createBillHeadInfo } = this.props.BillHeadInfo;
|
||||
let { cardTable, form, button, modal, cardPagination, socket } = this.props;
|
||||
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;
|
||||
|
||||
|
||||
// this.props.use.form('NCTable_83c3abf9')
|
||||
// this.props.form.setFormStatus('NCTable_83c3abf9', 'edit')
|
||||
return (
|
||||
<div className='nc-bill-card' id='mm-mmpac-pickm-card' >
|
||||
{socket.connectMesg({
|
||||
|
@ -265,6 +268,23 @@ class PickmCard extends Component {
|
|||
{createModal('TakeOverDlg', { zIndex: "300" })}
|
||||
{createModal('SetBackDeliverDlg', { zIndex: "280" })}
|
||||
{createModal('ReplaceDlg', { zIndex: "300" })}
|
||||
|
||||
{createModal('NCTable_83c3abf9', {
|
||||
title: '发票类型',
|
||||
content: (
|
||||
<div class="flex-container" style={{ height: '100%' }}>
|
||||
{createSimpleTable("NCTable_83c3abf9", {showIndex: true})}</div>
|
||||
),
|
||||
size: '100',
|
||||
beSureBtnClick: () => {
|
||||
|
||||
|
||||
},
|
||||
cancelBtnClick: () => {
|
||||
this.props.modal.close('NCTable_83c3abf9')
|
||||
},
|
||||
userControl: true
|
||||
})}
|
||||
<div>
|
||||
<ReserveQuery
|
||||
show={this.state.showReserveQuery}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import {
|
||||
backBtnClick, addBtnClick, delBtnClick, editBtnClick, cancelBtnClick, saveBtnClick, saveCommitBtnClick, copyBtnClick,
|
||||
commitBtnClick, unCommitBtnClick, printBtnClick, outputBtnClick, subItemsBtnClick, finishBtnClick, unfinishBtnClick,
|
||||
clqueryBtnClick, replaceBtnClick, pageInfoClick, reserveBtnClick, reserveQueryBtnClick
|
||||
clqueryBtnClick, replaceBtnClick, pageInfoClick, reserveBtnClick, reserveQueryBtnClick, detailqueryBtnClick
|
||||
} from '../btnClicks';//
|
||||
import newLineDefaultUtil from '../utils/newLineDefaultUtil';
|
||||
import { CARD_BTN, AREA, URL, PAGECARDCODE, FIELD, UISTATE, DIALOGCODE, PickmCache, appcode } from '../../constance';
|
||||
|
@ -795,40 +795,43 @@ export default async function clickBtn(props, id, text, record, index) {
|
|||
case CARD_BTN.PickmQueryYL:
|
||||
let pickmReservQuery = reserveQueryBtnClick.bind(this);
|
||||
return pickmReservQuery(props);
|
||||
case CARD_BTN.toOtherWarehouse:
|
||||
rowids = [];
|
||||
hids = [];
|
||||
if (record && record.values.cpickm_bid && record.values.cpickm_bid.value) {
|
||||
rowids.push(record.values.cpickm_bid.value);
|
||||
hid = record.values.cpickmid.value;
|
||||
} else {
|
||||
let rows = this.props.cardTable.getCheckedRows(AREA.bodyTable);
|
||||
hid = this.props.form.getFormItemsValue(AREA.formArea, FIELD.hid).value;
|
||||
// 如果没有选中行,则提示并返回,不进行任何操作
|
||||
if (!rows || rows.length <= 0) {
|
||||
hids.push(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;
|
||||
rowids.push(cpickm_bid);
|
||||
});
|
||||
case CARD_BTN.toOtherWarehouse://其他入库
|
||||
|
||||
case "toOtherWarehouse":
|
||||
detailqueryBtnClick.call(this, this.props, record);
|
||||
// rowids = [];
|
||||
// hids = [];
|
||||
// if (record && record.values.cpickm_bid && record.values.cpickm_bid.value) {
|
||||
// rowids.push(record.values.cpickm_bid.value);
|
||||
// hid = record.values.cpickmid.value;
|
||||
// } else {
|
||||
// let rows = this.props.cardTable.getCheckedRows(AREA.bodyTable);
|
||||
// hid = this.props.form.getFormItemsValue(AREA.formArea, FIELD.hid).value;
|
||||
// // 如果没有选中行,则提示并返回,不进行任何操作
|
||||
// if (!rows || rows.length <= 0) {
|
||||
// hids.push(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;
|
||||
// rowids.push(cpickm_bid);
|
||||
// });
|
||||
|
||||
}
|
||||
}
|
||||
data = {
|
||||
cpickmids: hids,
|
||||
cpickmbids: rowids
|
||||
}
|
||||
ajax({
|
||||
url: URL.convertOtherIn,
|
||||
data: data,
|
||||
success: (res) => {
|
||||
if (res.success) {
|
||||
toast({ color: 'success', title: "推送成功" });
|
||||
}
|
||||
}
|
||||
});
|
||||
// }
|
||||
// }
|
||||
// data = {
|
||||
// cpickmids: hids,
|
||||
// cpickmbids: rowids
|
||||
// }
|
||||
// ajax({
|
||||
// url: URL.convertOtherIn,
|
||||
// data: data,
|
||||
// success: (res) => {
|
||||
// if (res.success) {
|
||||
// toast({ color: 'success', title: "推送成功" });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -209,7 +209,8 @@ const URL = {
|
|||
replaceAutoMatchURL:'/nccloud/mmpac/pickm/replaceAutoMatch.do',
|
||||
deleteLineURL: '/nccloud/mmpac/pickm/deleteline.do',
|
||||
queryByCondURL:'/nccloud/mmpac/pickm/queryByCond.do',
|
||||
convertOtherIn:'/nccloud/mmpac/pickm/convertOtherIn.do'
|
||||
convertOtherIn:'/nccloud/mmpac/pickm/convertOtherIn.do',
|
||||
pickmItemsQuery:'/nccloud/mmpac/pickm/pickmItemsQuery.do'
|
||||
};
|
||||
|
||||
const tabURL = '/list';
|
||||
|
|
Loading…
Reference in New Issue