组装单及其相关的前端源码3
This commit is contained in:
parent
b3d151bd22
commit
855c0405c2
|
|
@ -0,0 +1,26 @@
|
||||||
|
import ExtendRefer from '../../components/onhandRefer';
|
||||||
|
export default function(props = {}) {
|
||||||
|
var conf = {
|
||||||
|
multiLang: {
|
||||||
|
domainName: 'ic',
|
||||||
|
currentLocale: 'zh-CN',
|
||||||
|
moduleId: '4008pub'
|
||||||
|
},
|
||||||
|
headRows: { rows: [] },
|
||||||
|
//placeholder: '4008PUB-000112',
|
||||||
|
showBatch: true,
|
||||||
|
appcode: '400802202',
|
||||||
|
headTemplateCode: '400802202_head',
|
||||||
|
bodyTemplateCode: '400802202_body',
|
||||||
|
undealNumCode: 'onhandshouldnum',
|
||||||
|
thisNumCode: 'onhandcurrentnum',
|
||||||
|
isSatisfyCode: 'fulfiltype',
|
||||||
|
editable: true,
|
||||||
|
checkStrictly: false,
|
||||||
|
showHistory: false,
|
||||||
|
columnConfig: [ { name: [ '4008PUB-000112' ], code: [ 'vbatchcode' ] } ]
|
||||||
|
};
|
||||||
|
|
||||||
|
return <ExtendRefer {...Object.assign(conf, props)} />;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
* @Author: maopch
|
||||||
|
* @PageInfo: 序列号档案参照
|
||||||
|
* @Date: 2018-05-30 18:41:29
|
||||||
|
* @Last Modified by: raoczh
|
||||||
|
* @Last Modified time: 2019-07-16 20:28:06
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import './index.less';
|
||||||
|
import SerialNoRefer from './serialNoRefer';
|
||||||
|
export default function(props = {}) {
|
||||||
|
var conf = {
|
||||||
|
multiLang: {
|
||||||
|
domainName: 'ic',
|
||||||
|
currentLocale: 'zh-CN',
|
||||||
|
moduleId: '4008serialnorefer'
|
||||||
|
},
|
||||||
|
refType: 'grid',
|
||||||
|
refCode: 'serialNoRefer',
|
||||||
|
// placeholder: '4008SERIALNOREFER-000002' /* 国际化处理: 序列号*/,
|
||||||
|
refName: '4008SERIALNOREFER-000003' /* 国际化处理: 序列号档案*/,
|
||||||
|
columnConfig: [
|
||||||
|
{
|
||||||
|
name: [
|
||||||
|
'4008SERIALNOREFER-000002',
|
||||||
|
'4008SERIALNOREFER-000004'
|
||||||
|
// '4008SERIALNOREFER-000005'
|
||||||
|
// '4008SERIALNOREFER-000006'
|
||||||
|
] /* 国际化处理: 序列号,货位,主数量,条码*/,
|
||||||
|
// code: ['vsncode', 'locname', 'nonhandnum', 'vbarcode']
|
||||||
|
code: [ 'vsncode', 'locname' ]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
checkStrictly: false,
|
||||||
|
isMultiSelectedEnabled: true,
|
||||||
|
queryGridUrl: '/nccloud/ic/location/queryserialnoref.do',
|
||||||
|
popWindowClassName: 'serial_no_refer'
|
||||||
|
};
|
||||||
|
return <SerialNoRefer {...Object.assign(conf, props)} />;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,138 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
|
||||||
|
import { base, high } from 'nc-lightapp-front';
|
||||||
|
import { deepClone } from 'src/scmpub/scmpub/pub/tool';
|
||||||
|
const { Refer } = high;
|
||||||
|
const { PopRefer, MultiLangWrapper } = Refer; // 引入PopRefer类
|
||||||
|
const { NCFormControl } = base;
|
||||||
|
import './index.less';
|
||||||
|
class SerialNoRefer extends PopRefer {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
...this.state, // 继承state
|
||||||
|
tableDataCopy: [], // tableData的备份
|
||||||
|
beginCode: null, // 起始序列号
|
||||||
|
endCode: null, // 终止序列号
|
||||||
|
vbarcode: '' // 条形码
|
||||||
|
};
|
||||||
|
initLang(this, [ '4008serialnorefer', '4008pub' ], 'ic', () => {});
|
||||||
|
}
|
||||||
|
|
||||||
|
renderPopoverSearchArea = () => {
|
||||||
|
let { beginCode, endCode } = this.state;
|
||||||
|
return (
|
||||||
|
<div className="serial">
|
||||||
|
<NCFormControl
|
||||||
|
wrapperClassName="serial-input"
|
||||||
|
placeholder={getLangByResId(this, '4008SERIALNOREFER-000000')} /* 国际化处理: 起始序列号*/
|
||||||
|
value={beginCode}
|
||||||
|
onChange={(v) => this.setState({ beginCode: v })}
|
||||||
|
onKeyUp={(e) => {
|
||||||
|
if (e.keyCode == 13) {
|
||||||
|
this.selectSer('begin');
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onBlur={() => this.selectSer('begin')}
|
||||||
|
/>
|
||||||
|
<span className="to">-</span>
|
||||||
|
<NCFormControl
|
||||||
|
wrapperClassName="serial-input"
|
||||||
|
placeholder={getLangByResId(this, '4008SERIALNOREFER-000001')} /* 国际化处理: 终止序列号*/
|
||||||
|
value={endCode}
|
||||||
|
ref={(dom) => {
|
||||||
|
this.input = ReactDOM.findDOMNode(dom);
|
||||||
|
}}
|
||||||
|
onChange={(v) => this.setState({ endCode: v })}
|
||||||
|
onKeyUp={(e) => {
|
||||||
|
if (e.keyCode == 13) {
|
||||||
|
this.selectSer('end');
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onBlur={() => this.selectSer('end')}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 如果需要 [输入条形码功能] 就放开下面方法的注释
|
||||||
|
// renderPopoverPageArea = () => {
|
||||||
|
// let { vbarcode } = this.state;
|
||||||
|
// return (
|
||||||
|
// <div className="barcode">
|
||||||
|
// <span className="barcode-label">请输入条形码:</span>
|
||||||
|
// <NCFormControl
|
||||||
|
// className="barcode-input"
|
||||||
|
// value={vbarcode}
|
||||||
|
// onChange={v => this.setState({ vbarcode: v })}
|
||||||
|
// onKeyUp={e => {
|
||||||
|
// if (e.keyCode == 13) this.filterData();
|
||||||
|
// }}
|
||||||
|
// />
|
||||||
|
// </div>
|
||||||
|
// );
|
||||||
|
// };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过用户输入自动勾选序列号
|
||||||
|
*/
|
||||||
|
selectSer = (flag) => {
|
||||||
|
const { beginCode, endCode, tableData } = this.state;
|
||||||
|
let selectedValues = new Map();
|
||||||
|
if (flag == 'begin' && !endCode) {
|
||||||
|
this.input.querySelectorAll('input')[0].focus();
|
||||||
|
for (const row of tableData[0].rows) {
|
||||||
|
beginCode == row.refname && selectedValues.set(row.refpk, row);
|
||||||
|
}
|
||||||
|
} else if (flag == 'end' && !beginCode) {
|
||||||
|
for (const row of tableData[0].rows) {
|
||||||
|
endCode == row.refname && selectedValues.set(row.refpk, row);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 后台返回数据循环
|
||||||
|
for (const row of tableData[0].rows) {
|
||||||
|
if (beginCode <= row.refname && endCode >= row.refname) {
|
||||||
|
selectedValues.set(row.refpk, row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// selectedValues 是父类的state
|
||||||
|
this.setState({ selectedValues });
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过条形码过滤
|
||||||
|
*/
|
||||||
|
filterData = () => {
|
||||||
|
const { tableData, tableDataCopy, vbarcode } = this.state;
|
||||||
|
|
||||||
|
if (vbarcode === 0 || vbarcode) {
|
||||||
|
// 条形码input中有东西
|
||||||
|
// deepClone 保证不指向同一内存
|
||||||
|
let tableDatac = deepClone(tableData);
|
||||||
|
// 保存数据
|
||||||
|
this.setState({ tableDataCopy: tableData });
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
tableDatac[0].rows = tableDatac[0].rows.filter((row) => {
|
||||||
|
let vbc = row.vbarcode;
|
||||||
|
if (vbc && vbc.indexOf(vbarcode) == -1) {
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.setState({ tableData: tableDatac });
|
||||||
|
}, 0);
|
||||||
|
} else {
|
||||||
|
// 条形码input中没有东西
|
||||||
|
if (tableDataCopy && tableDataCopy.length > 0) {
|
||||||
|
this.setState({ tableData: tableDataCopy });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
SerialNoRefer = MultiLangWrapper(SerialNoRefer);
|
||||||
|
|
||||||
|
export default SerialNoRefer;
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
* @Author: zhengxinm
|
||||||
|
* @PageInfo: 库存状态参照
|
||||||
|
* @Date: 2018-06-28 21:52:42
|
||||||
|
* @Last Modified by: zhengxinm
|
||||||
|
* @Last Modified time: 2018-10-23 11:33:27
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import { high } from 'nc-lightapp-front';
|
||||||
|
const { Refer } = high;
|
||||||
|
|
||||||
|
export default function(props = {}) {
|
||||||
|
var conf = {
|
||||||
|
multiLang: {
|
||||||
|
domainName: 'ic',
|
||||||
|
currentLocale: 'zh-CN',
|
||||||
|
moduleId: '4008storestaterefer'
|
||||||
|
},
|
||||||
|
refType: 'grid',
|
||||||
|
placeholder: '4008STORESTATEREFER-000000',
|
||||||
|
refName: '4008STORESTATEREFER-000000',
|
||||||
|
refCode: 'nccloud.web.ic.pub.ref.action.StoreStateRefAction',
|
||||||
|
queryGridUrl: '/nccloud/ic/storestate/querystorestateref.do',
|
||||||
|
columnConfig: [
|
||||||
|
{
|
||||||
|
name: ['4008STORESTATEREFER-000001', '4008STORESTATEREFER-000002'],
|
||||||
|
code: ['refcode', 'refname']
|
||||||
|
}
|
||||||
|
],
|
||||||
|
isMultiSelectedEnabled: false
|
||||||
|
};
|
||||||
|
|
||||||
|
return <Refer {...Object.assign(conf, props)} />;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
export default {
|
||||||
|
// 缓存key
|
||||||
|
cacheKey: 'vmiConRef',
|
||||||
|
|
||||||
|
// 结存单位
|
||||||
|
astuom: 'astuom',
|
||||||
|
// 批次号
|
||||||
|
lot: 'lot',
|
||||||
|
// 辅助属性
|
||||||
|
freeitem: 'freeitem',
|
||||||
|
// 消耗单据号
|
||||||
|
billcode: 'billcode',
|
||||||
|
// 物料版本
|
||||||
|
cmaterialvid: 'cmaterialvid',
|
||||||
|
|
||||||
|
// 用料部门
|
||||||
|
dept: 'dept',
|
||||||
|
// 成本对象
|
||||||
|
costobject: 'costobject',
|
||||||
|
// 工序
|
||||||
|
workproc: 'workproc',
|
||||||
|
// 生产订单
|
||||||
|
prdorder: 'prdorder'
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,284 @@
|
||||||
|
/*
|
||||||
|
* @Author: maopch
|
||||||
|
* @PageInfo: VMI汇总条件参照
|
||||||
|
* @Date: 2018-05-30 18:41:29
|
||||||
|
* @Last Modified by: fangmj7
|
||||||
|
* @Last Modified time: 2021-10-11 17:04:38
|
||||||
|
*/
|
||||||
|
import React from 'react';
|
||||||
|
import { initLang, getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil';
|
||||||
|
import { base, high, cacheTools, toast, ajax } from 'nc-lightapp-front';
|
||||||
|
import constance from './constance';
|
||||||
|
import './index.less';
|
||||||
|
|
||||||
|
const { PopRefer, MultiLangWrapper } = high.Refer; // 引入PopRefer类
|
||||||
|
const { NCCheckbox, NCCol, NCRow } = base;
|
||||||
|
const {
|
||||||
|
// 结存单位
|
||||||
|
astuom,
|
||||||
|
// 批次号
|
||||||
|
lot,
|
||||||
|
// 辅助属性
|
||||||
|
freeitem,
|
||||||
|
// 消耗单据号
|
||||||
|
billcode,
|
||||||
|
// 物料版本
|
||||||
|
cmaterialvid,
|
||||||
|
|
||||||
|
// 用料部门
|
||||||
|
dept,
|
||||||
|
// 成本对象
|
||||||
|
costobject,
|
||||||
|
// 工序
|
||||||
|
workproc,
|
||||||
|
// 生产订单
|
||||||
|
prdorder
|
||||||
|
} = constance;
|
||||||
|
|
||||||
|
const fieldsetStyle = { border: 'solid 1px rgba(235, 235, 235, 1)', margin: 20 };
|
||||||
|
const colStyle = { margin: '20px 0px' };
|
||||||
|
|
||||||
|
class VmiConditionRefer extends PopRefer {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
...this.state, // 继承state
|
||||||
|
// 结存单位
|
||||||
|
astuom: false,
|
||||||
|
// 批次号
|
||||||
|
lot: false,
|
||||||
|
// 辅助属性
|
||||||
|
freeitem: false,
|
||||||
|
// 消耗单据号
|
||||||
|
billcode: false,
|
||||||
|
// 物料版本
|
||||||
|
cmaterialvid: false,
|
||||||
|
|
||||||
|
// 用料部门
|
||||||
|
dept: false,
|
||||||
|
// 成本对象
|
||||||
|
costobject: false,
|
||||||
|
// 工序
|
||||||
|
workproc: false,
|
||||||
|
// 生产订单
|
||||||
|
prdorder: false
|
||||||
|
};
|
||||||
|
initLang(this, [ '4008vmiconditionrefer' ], 'ic', () => {});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 去掉搜索
|
||||||
|
renderPopoverSearchArea = () => {
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
renderPopoverSearchExtendArea = () => {
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
renderPopoverLeft = () => {
|
||||||
|
return <div style={{ border: '1px solid #000', height: '359px' }}>renderPopoverLeft</div>;
|
||||||
|
};
|
||||||
|
renderPopoverLeftHeader = () => {
|
||||||
|
return <div style={{ border: '1px solid #000' }}>renderPopoverLeftHeader</div>;
|
||||||
|
};
|
||||||
|
// 去掉分页
|
||||||
|
renderPopoverPageArea = () => {
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 为了解决下面这个bug, 要重写这个方法
|
||||||
|
* 消耗汇总汇总,汇总条件选择后点击查看已选,会自动把所有选中的数据清空
|
||||||
|
* */
|
||||||
|
|
||||||
|
loadSelectedData = () => {};
|
||||||
|
// renderPopoverBottom = () => {
|
||||||
|
// return <div style={{ border: '1px solid #000' }}>renderPopoverBottom</div>;
|
||||||
|
// };
|
||||||
|
|
||||||
|
// 复写父类方法
|
||||||
|
// show = () => {
|
||||||
|
// let { disabled, isTreelazyLoad, queryGridUrl, isCacheable } = this.props,
|
||||||
|
// { selectedValues, isFirstShow, treeData } = this.state;
|
||||||
|
// if (disabled) {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// let param, cacheData;
|
||||||
|
// param = this.__getParam({});
|
||||||
|
// cacheData = this.hasCache(queryGridUrl, param);
|
||||||
|
// if (!(isCacheable && cacheData)) {
|
||||||
|
// // loadTableData 获取后台返回的参数
|
||||||
|
// this.loadTableData(param).then(data => {
|
||||||
|
// this.initState(data);
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// this.initState(cacheData);
|
||||||
|
// }
|
||||||
|
// this.setState({
|
||||||
|
// isShow: true,
|
||||||
|
// isFirstShow: false,
|
||||||
|
// dropDownShow: false
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化state
|
||||||
|
* @param {object} data 后台返回的数据
|
||||||
|
*/
|
||||||
|
initState = (data) => {
|
||||||
|
let { selectedValues } = this.state;
|
||||||
|
let state = {};
|
||||||
|
for (const key in data) {
|
||||||
|
if (data.hasOwnProperty(key) && this.state.hasOwnProperty(key)) {
|
||||||
|
state[key] = data[key] == 'Y' ? true : false;
|
||||||
|
if (state[key]) {
|
||||||
|
selectedValues.set(key, {
|
||||||
|
refpk: key,
|
||||||
|
refname: this.getRefName(key),
|
||||||
|
refcode: this.getRefName(key)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.setState(state);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据key 获取对应的 name
|
||||||
|
* @param {string} key
|
||||||
|
*/
|
||||||
|
getRefName = (key) => {
|
||||||
|
switch (key) {
|
||||||
|
case astuom:
|
||||||
|
return getLangByResId(this, '4008VMICONDITIONREFER-000000'); /* 国际化处理: 结存单位*/
|
||||||
|
case lot:
|
||||||
|
return getLangByResId(this, '4008VMICONDITIONREFER-000001'); /* 国际化处理: 批次号*/
|
||||||
|
case freeitem:
|
||||||
|
return getLangByResId(this, '4008VMICONDITIONREFER-000002'); /* 国际化处理: 辅助属性*/
|
||||||
|
case billcode:
|
||||||
|
return getLangByResId(this, '4008VMICONDITIONREFER-000003'); /* 国际化处理: 消耗单据号*/
|
||||||
|
case cmaterialvid:
|
||||||
|
return getLangByResId(this, '4008VMICONDITIONREFER-000004'); /* 国际化处理: 物料版本*/
|
||||||
|
case dept:
|
||||||
|
return getLangByResId(this, '4008VMICONDITIONREFER-000005'); /* 国际化处理: 用料部门*/
|
||||||
|
case costobject:
|
||||||
|
return getLangByResId(this, '4008VMICONDITIONREFER-000006'); /* 国际化处理: 成本对象*/
|
||||||
|
case workproc:
|
||||||
|
return getLangByResId(this, '4008VMICONDITIONREFER-000007'); /* 国际化处理: 工序*/
|
||||||
|
case prdorder:
|
||||||
|
return getLangByResId(this, '4008VMICONDITIONREFER-000008'); /* 国际化处理: 生产订单*/
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
renderPopoverRight = () => {
|
||||||
|
let group1 = [
|
||||||
|
{ label: getLangByResId(this, '4008VMICONDITIONREFER-000000'), code: 'astuom' } /* 国际化处理: 结存单位*/,
|
||||||
|
{ label: getLangByResId(this, '4008VMICONDITIONREFER-000001'), code: 'lot' } /* 国际化处理: 批次号*/,
|
||||||
|
{
|
||||||
|
label: getLangByResId(this, '4008VMICONDITIONREFER-000002'),
|
||||||
|
code: 'freeitem'
|
||||||
|
} /* 国际化处理: 辅助属性*/,
|
||||||
|
{
|
||||||
|
label: getLangByResId(this, '4008VMICONDITIONREFER-000003'),
|
||||||
|
code: 'billcode'
|
||||||
|
} /* 国际化处理: 消耗单据号*/,
|
||||||
|
{
|
||||||
|
label: getLangByResId(this, '4008VMICONDITIONREFER-000004'),
|
||||||
|
code: 'cmaterialvid'
|
||||||
|
} /* 国际化处理: 物料版本*/
|
||||||
|
];
|
||||||
|
let group2 = [
|
||||||
|
{ label: getLangByResId(this, '4008VMICONDITIONREFER-000005'), code: 'dept' } /* 国际化处理: 用料部门*/,
|
||||||
|
{
|
||||||
|
label: getLangByResId(this, '4008VMICONDITIONREFER-000006'),
|
||||||
|
code: 'costobject'
|
||||||
|
} /* 国际化处理: 成本对象*/,
|
||||||
|
{ label: getLangByResId(this, '4008VMICONDITIONREFER-000007'), code: 'workproc' } /* 国际化处理: 工序*/,
|
||||||
|
{ label: getLangByResId(this, '4008VMICONDITIONREFER-000008'), code: 'prdorder' } /* 国际化处理: 生产订单*/
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<div className="summary">
|
||||||
|
<div className="nc-theme-common-font-c title">
|
||||||
|
{getLangByResId(this, '4008VMICONDITIONREFER-000009') /* 国际化处理: 汇总条件*/}
|
||||||
|
</div>
|
||||||
|
<ul className="list">
|
||||||
|
{group1.map(({ code, label }) => (
|
||||||
|
<li>
|
||||||
|
<NCCheckbox
|
||||||
|
autoFocus
|
||||||
|
checked={!!this.state.selectedValues.get(code)}
|
||||||
|
onChange={() => {
|
||||||
|
let { selectedValues } = this.state;
|
||||||
|
if (!selectedValues.get(code)) {
|
||||||
|
selectedValues.set(code, { refpk: code, refname: label, refcode: label });
|
||||||
|
} else {
|
||||||
|
selectedValues.delete(code);
|
||||||
|
}
|
||||||
|
this.setState({ selectedValues });
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
</NCCheckbox>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
<div className="nc-theme-common-font-c title">
|
||||||
|
{getLangByResId(this, '4008VMICONDITIONREFER-000011') /* 国际化处理: 出库明细汇总条件*/}
|
||||||
|
</div>
|
||||||
|
<ul className="list">
|
||||||
|
{group2.map(({ code, label }) => (
|
||||||
|
<li>
|
||||||
|
<NCCheckbox
|
||||||
|
checked={!!this.state.selectedValues.get(code)}
|
||||||
|
onChange={() => {
|
||||||
|
let { selectedValues } = this.state;
|
||||||
|
if (!selectedValues.get(code)) {
|
||||||
|
selectedValues.set(code, { refpk: code, refname: label, refcode: label });
|
||||||
|
} else {
|
||||||
|
selectedValues.delete(code);
|
||||||
|
}
|
||||||
|
this.setState({ selectedValues });
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
</NCCheckbox>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
VmiConditionRefer = MultiLangWrapper(VmiConditionRefer);
|
||||||
|
|
||||||
|
export default function(props = {}) {
|
||||||
|
var conf = {
|
||||||
|
multiLang: {
|
||||||
|
domainName: 'ic',
|
||||||
|
currentLocale: 'zh-CN',
|
||||||
|
moduleId: '4008vmiconditionrefer'
|
||||||
|
},
|
||||||
|
refType: 'grid',
|
||||||
|
placeholder: '4008VMICONDITIONREFER-000009' /* 国际化处理: 汇总条件*/,
|
||||||
|
refName: '4008VMICONDITIONREFER-000010' /* 国际化处理: VMI汇总条件参照*/,
|
||||||
|
refCode: 'vmiConditionRefer',
|
||||||
|
isShowDisabledData: false,
|
||||||
|
isMultiSelectedEnabled: true,
|
||||||
|
showCodeWhenFocus: false,
|
||||||
|
queryGridUrl: '/nccloud/ic/vmisum/queryvmicondtionref.do'
|
||||||
|
};
|
||||||
|
return <VmiConditionRefer {...Object.assign(conf, props)} />;
|
||||||
|
// return (
|
||||||
|
// <VmiConditionRefer
|
||||||
|
// refType={'grid'}
|
||||||
|
// placeholder={getLangByResId(this, '4008VMICONDITIONREFER-000009')} /* 国际化处理: 汇总条件*/
|
||||||
|
// refName={getLangByResId(this, '4008VMICONDITIONREFER-000010')} /* 国际化处理: VMI汇总条件参照*/
|
||||||
|
// refCode={'vmiConditionRefer'}
|
||||||
|
// isShowDisabledData={false}
|
||||||
|
// isMultiSelectedEnabled={true}
|
||||||
|
// queryGridUrl={'/nccloud/ic/vmisum/queryvmicondtionref.do'}
|
||||||
|
// {...props}
|
||||||
|
// />
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* @Author: maopch
|
||||||
|
* @PageInfo: VMI汇总条件参照
|
||||||
|
* @Date: 2018-05-30 18:41:29
|
||||||
|
* @Last Modified by: zhengxinm
|
||||||
|
* @Last Modified time: 2018-10-23 11:45:58
|
||||||
|
*/
|
||||||
|
import React from 'react';
|
||||||
|
import { high } from 'nc-lightapp-front';
|
||||||
|
const { Refer } = high;
|
||||||
|
export default function(props = {}) {
|
||||||
|
var conf = {
|
||||||
|
multiLang: {
|
||||||
|
domainName: 'ic',
|
||||||
|
currentLocale: 'zh-CN',
|
||||||
|
moduleId: '4008vmirulerefer'
|
||||||
|
},
|
||||||
|
refType: 'grid',
|
||||||
|
placeholder:
|
||||||
|
'4008vmirulerefer-000000' /* 国际化处理: 消耗汇总规则,消耗汇总规则*/ /* 国际化处理: 消耗汇总规则*/,
|
||||||
|
refName: '4008vmirulerefer-000000' /* 国际化处理: 消耗汇总规则,消耗汇总规则*/ /* 国际化处理: 消耗汇总规则*/,
|
||||||
|
refCode: 'nccloud.web.ic.pub.ref.action.VmiRuleRefAction',
|
||||||
|
isShowDisabledData: false,
|
||||||
|
queryGridUrl: '/nccloud/ic/vmisum/queryvmiruleref.do',
|
||||||
|
columnConfig: [
|
||||||
|
{
|
||||||
|
name: [
|
||||||
|
'4008vmirulerefer-000001',
|
||||||
|
'4008vmirulerefer-000002'
|
||||||
|
] /* 国际化处理: 编码,名称,编码,名称*/ /* 国际化处理: 编码,名称*/,
|
||||||
|
code: ['vmicode', 'vminame']
|
||||||
|
}
|
||||||
|
],
|
||||||
|
isMultiSelectedEnabled: false
|
||||||
|
};
|
||||||
|
|
||||||
|
return <Refer {...Object.assign(conf, props)} />;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue