);
},
title: () => (this.props.setOpterationColumn === 'Y' && this.getTableFilterData() === 0 ?
{setOperation} {uploadIcon ?
+ { this.uploadRef1 = ref; }}
+ onPaste={this.handleUploadByClipboard}
+ onMouseOver={() => {
+ this.uploadRef1.setAttribute('contenteditable', "true");
}}
- >{setOperation} {uploadIcon ?
- {this.uploadRef1 = ref;}}
- onPaste={this.handleUploadByClipboard}
- onMouseOver={() => {
- this.uploadRef1.setAttribute('contenteditable', "true");
- }}
- onKeyDown={() => {
- this.uploadRef1.setAttribute('contenteditable', "false");
- }}
- onKeyUp={() => {
- this.uploadRef1.setAttribute('contenteditable', "true");
- }}
- >
- {
- this.props.enabled ? :
- }
-
- : {!this.props.bLimitOperate && (props.enabled || this.findIsUpdByControlName(this.props, 'BtnAdd')) ? : }
- { headPopup ? {!props.bLimitOperate && (props.enabled || this.findIsUpdByControlName(this.props, 'BtnHeadPopup')) ? : } : '' }}
+ onKeyDown={() => {
+ this.uploadRef1.setAttribute('contenteditable', "false");
+ }}
+ onKeyUp={() => {
+ this.uploadRef1.setAttribute('contenteditable', "true");
+ }}
+ >
+ {
+ this.props.enabled ? :
+ }
+
+ : {!this.props.bLimitOperate && (props.enabled || this.findIsUpdByControlName(this.props, 'BtnAdd')) ? : }
+ {headPopup ? {!props.bLimitOperate && (props.enabled || this.findIsUpdByControlName(this.props, 'BtnHeadPopup')) ? : } : ''}}
:
- uploadIcon ?
+ uploadIcon ?
{this.uploadRef1 = ref;}}
- onPaste={this.handleUploadByClipboard}
- onMouseOver={() => {
- this.uploadRef1.setAttribute('contenteditable', "true");
- }}
- onKeyDown={() => {
- this.uploadRef1.setAttribute('contenteditable', "false");
- }}
- onKeyUp={() => {
- this.uploadRef1.setAttribute('contenteditable', "true");
- }}
+ contenteditable="true"
+ ref={(ref) => { this.uploadRef1 = ref; }}
+ onPaste={this.handleUploadByClipboard}
+ onMouseOver={() => {
+ this.uploadRef1.setAttribute('contenteditable', "true");
+ }}
+ onKeyDown={() => {
+ this.uploadRef1.setAttribute('contenteditable', "false");
+ }}
+ onKeyUp={() => {
+ this.uploadRef1.setAttribute('contenteditable', "true");
+ }}
>
{
- this.props.enabled ? :
+ this.props.enabled ? :
}
-
- : {setOperation} { headPopup ? {!props.bLimitOperate && ( props.enabled || this.findIsUpdByControlName(this.props, 'BtnHeadPopup')) ? : } : '' } ),
+
+ :
{setOperation} {headPopup ? {!props.bLimitOperate && (props.enabled || this.findIsUpdByControlName(this.props, 'BtnHeadPopup')) ? : } : ''} ),
width: operateWidth + 'px',
// fixed: commonUtils.isNotEmptyObject(this.props.tableProps.AutoTableHeight) ? 'right' : false,
fixed: 'right',
@@ -3280,8 +3300,8 @@ class CommonTableRc extends React.Component {
return false;
}
returnProps.filterDropdown = ({
- setSelectedKeys, selectedKeys, confirm, clearFilters,
- }) => {
+ setSelectedKeys, selectedKeys, confirm, clearFilters,
+ }) => {
return (
item.sName === sName) : []; /* 找到该字段颜色配置 */
@@ -3430,7 +3450,7 @@ class CommonTableRc extends React.Component {
} = item;
if (!isRow) { /* 根据配置设置单元格颜色 */
let { conditionValue: conditionValueOld } = item;
- const conditionValue = record[conditionValueOld] ? record[conditionValueOld]: conditionValueOld;
+ const conditionValue = record[conditionValueOld] ? record[conditionValueOld] : conditionValueOld;
if (column === sName && !commonUtils.isEmpty(record[column])) {
if (condition === '=') {
styleColor = record[column] === conditionValue ? `SetCell_${background}` : '';
@@ -3484,7 +3504,7 @@ class CommonTableRc extends React.Component {
onPreviewOffice: this.handlePreviewOffice,
onDropdownVisibleChange: this.handleDropdownVisibleChange,
onFilterDropDownData: props.onFilterDropDownData,
- onFieldPopupModal:this.handleFieldPopupModal, /* 字段选择弹窗 */
+ onFieldPopupModal: this.handleFieldPopupModal, /* 字段选择弹窗 */
onFieldDoubleClick: this.props.onFieldDoubleClick,
onDropDownBlur: props.onDropDownBlur, /* 下拉框多选离开事件 */
className: styleColorArr,
@@ -3500,7 +3520,7 @@ class CommonTableRc extends React.Component {
/** 获取上传控件的props */
getUploadProps = () => {
return {
- disabled:this.props.name === 'picFile' ? !this.findIsUpdByControlName(this.props, 'BtnUpload') : !this.props.enabled, /* 是否可用 */
+ disabled: this.props.name === 'picFile' ? !this.findIsUpdByControlName(this.props, 'BtnUpload') : !this.props.enabled, /* 是否可用 */
style: { display: commonUtils.convertBooleanToDisplayBlock(this.isUploadShow) }, /* 是否显示 */
};
};
@@ -3661,7 +3681,7 @@ class CommonTableRc extends React.Component {
let bPagination = true; /* 默认表格分页s */
let pagination = {};
if (commonUtils.isNotEmptyObject(this.props)) {
- bPagination = (commonUtils.isNotEmptyObject(this.props.tableProps) && commonUtils.isNotEmptyObject(this.props.tableProps.pagination));
+ bPagination = (commonUtils.isNotEmptyObject(this.props.tableProps) && commonUtils.isNotEmptyObject(this.props.tableProps.pagination));
pagination = this.props.tableProps.pagination;
}
@@ -3690,7 +3710,7 @@ class CommonTableRc extends React.Component {
return;
}
/* 如果是树形 则返回 */
- if(this.props.sTableType && this.props.sTableType !='zero') {
+ if (this.props.sTableType && this.props.sTableType != 'zero') {
return;
}
const obj = {};
@@ -3715,7 +3735,7 @@ class CommonTableRc extends React.Component {
let flag = false;
for (const key in item) {
// 判断是否与上一个值相同
- if (item[key] !== '' && item[key] === prevData[key] && (commonUtils.isNotEmptyObject(sMergeCellFiled) ? item[sMergeCellFiled] === prevData[sMergeCellFiled] : true) ) {
+ if (item[key] !== '' && item[key] === prevData[key] && (commonUtils.isNotEmptyObject(sMergeCellFiled) ? item[sMergeCellFiled] === prevData[sMergeCellFiled] : true)) {
if (!obj[key]) {
obj[key] = [];
}
@@ -3761,7 +3781,7 @@ class CommonTableRc extends React.Component {
const prevData = this.curSlaveInfoData[index - 1];
for (const key in item) {
// 判断是否与上一个值相同
- if (item[key] !== '' && item[key] === prevData[key] && (commonUtils.isNotEmptyObject(sMergeCellFiled) ? item[sMergeCellFiled] === prevData[sMergeCellFiled] : true) ) {
+ if (item[key] !== '' && item[key] === prevData[key] && (commonUtils.isNotEmptyObject(sMergeCellFiled) ? item[sMergeCellFiled] === prevData[sMergeCellFiled] : true)) {
if (!obj[key]) {
obj[key] = [];
}
@@ -3837,18 +3857,18 @@ class CommonTableRc extends React.Component {
};
handleSelectCancel = (modelVisible) => {
this.setState({
- [modelVisible]:false,
+ [modelVisible]: false,
});
};
handleSelectCommonPopup = (name, selectConfig, selectData) => {
const { commonPopupTbName, commonPopupShowConfig, commonFieldPopupVisible, commonPopupVisible, commonFieldPopupTbName, commonFieldPopupShowConfig,
commonModalVisible, commonModalShowConfig, commonModalTbName } = this.state;
/* 若是产品名称弹窗 并且配置了调用产品工艺卡标识copyFromTechnology 则走自己的逻辑 */
- if(selectConfig.sCompareColor === 'copyFromTechnology') {
+ if (selectConfig.sCompareColor === 'copyFromTechnology') {
this.props.onSelectCommonPopupProduct(name, selectConfig, selectData, commonPopupTbName, commonPopupShowConfig);
} else {
- let tb = commonPopupVisible ? { name: commonPopupTbName, config: commonPopupShowConfig } : commonFieldPopupVisible ? { name: commonFieldPopupTbName, config: commonFieldPopupShowConfig } : undefined;
- tb = commonModalVisible ? { name: commonModalTbName, config: commonModalShowConfig }: tb;
+ let tb = commonPopupVisible ? { name: commonPopupTbName, config: commonPopupShowConfig } : commonFieldPopupVisible ? { name: commonFieldPopupTbName, config: commonFieldPopupShowConfig } : undefined;
+ tb = commonModalVisible ? { name: commonModalTbName, config: commonModalShowConfig } : tb;
if (selectConfig.sControlName?.startsWith('BtnPopupEdit')) {
this.props.onSelectCommonPopup(name, selectConfig, selectData, tb?.name, tb?.config, { index: this.rowClickRef.current });
return;
@@ -3945,7 +3965,7 @@ class CommonTableRc extends React.Component {
}
/* 快捷键跳转 */
- handleQuickViewClick = async (name, sName, record, index , myConfigArr) => {
+ handleQuickViewClick = async (name, sName, record, index, myConfigArr) => {
const {
slaveConfig,
slaveData,
@@ -3964,10 +3984,10 @@ class CommonTableRc extends React.Component {
// employeeConfig,
} = this.props;
let picArr = ''
- if(commonUtils.isNotEmptyArr(slaveConfig)){
- picArr = slaveConfig.gdsconfigformslave.filter(item => (item.sName === sName));
+ if (commonUtils.isNotEmptyArr(slaveConfig)) {
+ picArr = slaveConfig.gdsconfigformslave.filter(item => (item.sName === sName));
}
- if(commonUtils.isNotEmptyArr(myConfigArr)) {
+ if (commonUtils.isNotEmptyArr(myConfigArr)) {
picArr = myConfigArr;
}
if (picArr.length > 0) {
@@ -4074,14 +4094,14 @@ class CommonTableRc extends React.Component {
}
};
})
- };
+ };
/* 所有备注非编辑状态下点击链接可以弹出备注窗体 */
handleMemoShow = (name, sName, record, index, showConfig) => {
if (commonUtils.isNotEmptyObject(record)) {
const sMemo = showConfig.sName;
const title = showConfig.showName;
- if (sName.includes(['sTemplateFullMemo','sContentMemo'])) {
+ if (sName.includes(['sTemplateFullMemo', 'sContentMemo'])) {
return this.setState({ simpleModalVisible: true, simpleModalWord: record[sName] });
}
const sCurrMemoProps = {
@@ -4097,30 +4117,30 @@ class CommonTableRc extends React.Component {
this.props.onSaveState({ sCurrMemoProps });
}
}
- handleViewChoose= (name, sName, record, index) => {
+ handleViewChoose = (name, sName, record, index) => {
this.props.onViewChoose(name, sName, record, index);
}
/* 弹出通用窗体 */
- handlePopupModal= (showConfig, name) => {
+ handlePopupModal = (showConfig, name) => {
this.setState({
- commonPopupVisible:true,
- commonPopupTbName:name,
- commonPopupShowConfig:showConfig,
+ commonPopupVisible: true,
+ commonPopupTbName: name,
+ commonPopupShowConfig: showConfig,
});
}
/* 字段弹窗 */
- handleFieldPopupModal= (showConfig, name, record) => {
+ handleFieldPopupModal = (showConfig, name, record) => {
this.setState({
- commonFieldPopupVisible:true,
- commonFieldPopupTbName:name,
- commonFieldPopupShowConfig:showConfig,
+ commonFieldPopupVisible: true,
+ commonFieldPopupTbName: name,
+ commonFieldPopupShowConfig: showConfig,
commonFieldPopupShowRecord: record,
});
}
/* 蓝色链接弹出通用窗体 */
- handleTabModalClick= (name, sName, record, index, showConfig, configName) => {
+ handleTabModalClick = (name, sName, record, index, showConfig, configName) => {
// const { sourceAllData:data } = this.props;
// let commonModalData = [];
// if(sName === 'dSumCompleteAvailableStockQty' && commonUtils.isNotEmptyArr(data)) {
@@ -4129,11 +4149,11 @@ class CommonTableRc extends React.Component {
// item.bSecondMainMaterials);
// }
this.setState({
- commonModalVisible:true,
- commonModalTbName:name,
- commonModalShowConfig:showConfig,
- commonModalRecord:record,
- commonModalConfigName:configName,
+ commonModalVisible: true,
+ commonModalTbName: name,
+ commonModalShowConfig: showConfig,
+ commonModalRecord: record,
+ commonModalConfigName: configName,
// commonModalData,
});
}
@@ -4147,7 +4167,7 @@ class CommonTableRc extends React.Component {
const oDiv = {
'span': target.parentNode,
'td': target.childNodes[0].childNodes[0],
- 'div': target.getAttribute('data-name') ? target : target.childNodes[0],
+ 'div': target.getAttribute('data-name') ? target : target.childNodes[0],
}[tagName.toLowerCase()];
if (!oDiv || window.getSelection().toString()) return false;
@@ -4199,7 +4219,7 @@ class CommonTableRc extends React.Component {
}
/* 点击图片预览 */
- handlePreviewImage= (e, dataUrlArr) => {
+ handlePreviewImage = (e, dataUrlArr) => {
e.stopPropagation(); /* 阻止父级穿透 */
if (commonUtils.isNotEmptyObject(dataUrlArr)) {
const { token } = this.props.app;
@@ -4209,7 +4229,7 @@ class CommonTableRc extends React.Component {
previewImageArr.push(dataPreviewUrl);
});
this.setState({
- previewImage:previewImageArr,
+ previewImage: previewImageArr,
previewVisible: true,
showimgs: true,
firstIndex: 0,
@@ -4244,16 +4264,16 @@ class CommonTableRc extends React.Component {
const sBtnName = sName;
const sBtnContent = record[sName];
const sFormId = commonUtils.isNotEmptyObject(record.sId) ? record.sId : '';
- const sBtnControlName = commonUtils.isNotEmptyObject(showConfig.sControlName) ? showConfig.sControlName : '' ;
+ const sBtnControlName = commonUtils.isNotEmptyObject(showConfig.sControlName) ? showConfig.sControlName : '';
console.log('sFormId:', sFormId);
- if(commonUtils.isNotEmptyObject(sBtnContent)) {
+ if (commonUtils.isNotEmptyObject(sBtnContent)) {
const urlPrint = `${commonConfig.server_host}template/getSql/${sBtnName}/?sBtnContent=${sBtnContent}&sBtnControlName=${sBtnControlName}&sFormId=${sFormId}`;
- const w=window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
- const h=window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
+ const w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
+ const h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
//const newWin = window.open('','_blank');
- const features = "width="+(w+350)+",height="+(h+300)+", top=0, left=0, toolbar=no, menubar=no,scrollbars=no,resizable=no, location =no, status=no";
+ const features = "width=" + (w + 350) + ",height=" + (h + 300) + ", top=0, left=0, toolbar=no, menubar=no,scrollbars=no,resizable=no, location =no, status=no";
const newWin = window.open("", "SQL查看器", features);
- newWin.document.write('
');
+ newWin.document.write('
');
// window.open(urlPrint);
} else {
message.error('未找到对应过程名');
@@ -4262,7 +4282,7 @@ class CommonTableRc extends React.Component {
/* 右箭头点击 */
handleRightArrow = (name, sName, record, index, showConfig) => {
- if(this.props.onRightArrow) {
+ if (this.props.onRightArrow) {
this.props.onRightArrow(name, sName, record, index, showConfig);
}
@@ -4272,9 +4292,9 @@ class CommonTableRc extends React.Component {
handleOperateMoreOk = () => {
const sNumber = document.getElementById('iNumber').value;
console.log('sNumber', sNumber);
- if(commonUtils.isNotEmptyObject(iNumber) && Number(sNumber) > 0 ) {
- const iNumber = Number(sNumber);
- for(let i = 0; i< iNumber ; i++) {
+ if (commonUtils.isNotEmptyObject(iNumber) && Number(sNumber) > 0) {
+ const iNumber = Number(sNumber);
+ for (let i = 0; i < iNumber; i++) {
this.handleCopyRow(0);
}
}
@@ -4426,10 +4446,10 @@ class CommonTableRc extends React.Component {
};
}
- genFooter= () => {
+ genFooter = () => {
const { tableColumn, totalData: totalData0, totalDataNew, sumGroup = {}, totalData1 } = this.state;
const totalData = Object.keys(sumGroup).some(key => sumGroup[key]?.length) ? totalDataNew : totalData0;
- const { dNetMoney, dNetPrice } = this.props.app.decimals;
+ const { dNetMoney, dNetPrice } = this.props.app.decimals;
const sModelsType = commonUtils.isNotEmptyObject(this.props) && commonUtils.isNotEmptyObject(this.props.app) ? this.props.app.currentPane.sModelsType : '';
const sumset = commonFunc.showMessage(this.props.app.commonConst, 'sumSet') || '合计';
@@ -4437,13 +4457,13 @@ class CommonTableRc extends React.Component {
if ((!totalData.length && !totalData1.length) || this.props.footer !== undefined) {
return (<>>);
}
- if(this.props.tableProps.rowSelection !== null && !(this.props.config && !this.props.config.bisMutiSelect)) {
+ if (this.props.tableProps.rowSelection !== null && !(this.props.config && !this.props.config.bisMutiSelect)) {
colSpan = colSpan + 1;
}
- if(this.props.slaveInfo) {
+ if (this.props.slaveInfo) {
colSpan = colSpan + 1;
}
- if(this.props.dragHandle) {
+ if (this.props.dragHandle) {
// colSpan = colSpan + 1; // 临时处理标准精准报价单据工序信息表合计错位问题
}
const cells = [];
@@ -4451,7 +4471,7 @@ class CommonTableRc extends React.Component {
if (totalData.length) {
let summaryCellTotal = '';
summaryCellTotal = (
-
+
{sumset}
);
@@ -4471,7 +4491,7 @@ class CommonTableRc extends React.Component {
cells.push(summaryCellTotal);
tableColumn.forEach((item, index) => {
- if(colSpan === 0 && index === 0) {
+ if (colSpan === 0 && index === 0) {
return;
}
let iTag = index + colSpan;
@@ -4483,39 +4503,39 @@ class CommonTableRc extends React.Component {
if (commonUtils.isNotEmptyObject(itemChild.dataIndex) && itemChild.dataIndex.substring(0, 1) === 'd' && columnConfig?.sDateFormat === 'decimalPoint' && columnConfig?.sFieldValidation) {
/* 取小数点位数 */
const point = columnConfig.sFieldValidation.split(',')[1] || 2;
- if(commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
+ if (commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
const dConfigResult = commonUtils.convertFixNum(Number(sValue), point).toFixed(point);
- if(!isNaN(dConfigResult)) {
+ if (!isNaN(dConfigResult)) {
sValue = dConfigResult;
}
}
- } else if( commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase().indexOf('commonList') || (sModelsType && sModelsType.indexOf('commonMultiList') > -1)) {
+ } else if (commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase().indexOf('commonList') || (sModelsType && sModelsType.indexOf('commonMultiList') > -1)) {
/* 有配置以配置为主 否则以系统设定为主 */
- if(commonUtils.isNotEmptyObject(itemChild.dataIndex) && itemChild.dataIndex.substring(0, 1) === 'd' && commonUtils.isNotEmptyObject(itemChild.sDateFormat)) {
+ if (commonUtils.isNotEmptyObject(itemChild.dataIndex) && itemChild.dataIndex.substring(0, 1) === 'd' && commonUtils.isNotEmptyObject(itemChild.sDateFormat)) {
/* 取小数点位数 */
let point = 0;
let strIndex = itemChild.sDateFormat.indexOf('.');
- if(strIndex > -1 && itemChild.sDateFormat.length > 1) {
+ if (strIndex > -1 && itemChild.sDateFormat.length > 1) {
point = itemChild.sDateFormat.substring(strIndex + 1, itemChild.sDateFormat.length).length;
- if(commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
+ if (commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
const dConfigResult = commonUtils.convertFixNum(Number(sValue), point).toFixed(point);
- if(!isNaN(dConfigResult)) {
+ if (!isNaN(dConfigResult)) {
sValue = dConfigResult;
}
}
}
} else {
- if ( commonUtils.isNotEmptyObject(itemChild.dataIndex) && itemChild.dataIndex.toLowerCase().endsWith('price')) { /* 列表单价格式化显示1 */
- if(commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
+ if (commonUtils.isNotEmptyObject(itemChild.dataIndex) && itemChild.dataIndex.toLowerCase().endsWith('price')) { /* 列表单价格式化显示1 */
+ if (commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
const dResult = commonUtils.convertFixNum(Number(sValue), dNetPrice).toFixed(dNetPrice);
- if(!isNaN(dResult)) {
+ if (!isNaN(dResult)) {
sValue = dResult;
}
}
} else if (commonUtils.isNotEmptyObject(itemChild.dataIndex) && itemChild.dataIndex.toLowerCase().endsWith('money')) { /* 列表金额格式化显示 */
- if(commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
+ if (commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
const dResult = commonUtils.convertFixNum(Number(sValue), dNetMoney).toFixed(dNetMoney);
- if(!isNaN(dResult)) {
+ if (!isNaN(dResult)) {
sValue = dResult;
}
}
@@ -4535,19 +4555,19 @@ class CommonTableRc extends React.Component {
let cell = '';
/* commonList 格式化单价、金额 */
let sValue = totalData[0][item.dataIndex];
- if( commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase().indexOf('commonList') || (sModelsType && sModelsType.indexOf('commonMultiList') > -1)) {
+ if (commonUtils.isNotEmptyObject(location.pathname) && location.pathname.toLowerCase().indexOf('commonList') || (sModelsType && sModelsType.indexOf('commonMultiList') > -1)) {
/* 有配置以配置为主 否则以系统设定为主 */
const columnConfig = this.props.config.gdsconfigformslave.find(item1 => item1.sName === item.dataIndex);
if (commonUtils.isNotEmptyObject(item.dataIndex) && item.dataIndex.substring(0, 1) === 'd' && columnConfig?.sDateFormat === 'decimalPoint' && columnConfig?.sFieldValidation) {
/* 取小数点位数 */
const point = columnConfig.sFieldValidation.split(',')[1] || 2;
- if(commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
+ if (commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
const dConfigResult = commonUtils.convertFixNum(Number(sValue), point).toFixed(point);
- if(!isNaN(dConfigResult)) {
+ if (!isNaN(dConfigResult)) {
sValue = dConfigResult;
}
}
- } else if ( commonUtils.isNotEmptyObject(item.sDateFormat)) {
+ } else if (commonUtils.isNotEmptyObject(item.sDateFormat)) {
/* 取小数点位数 */
let point = 0;
let strIndex = item.sDateFormat.indexOf('.');
@@ -4593,13 +4613,13 @@ class CommonTableRc extends React.Component {
if (totalData1.length) {
let summaryCellTotal1 = '';
summaryCellTotal1 = (
-
+
总计
);
cells1.push(summaryCellTotal1);
tableColumn.forEach((item, index) => {
- if(colSpan === 0 && index === 0) {
+ if (colSpan === 0 && index === 0) {
return;
}
let iTag = index + colSpan;
@@ -4690,15 +4710,15 @@ class CommonTableRc extends React.Component {
} else {
/* 如果设置格式 按照设置格式来,否则按照系统设定 */
const sFieldConfigArr = config.gdsconfigformslave.filter(item => item.sName === sumItem.sName && item.bVisible);
- if(commonUtils.isNotEmptyArr(sFieldConfigArr)) {
+ if (commonUtils.isNotEmptyArr(sFieldConfigArr)) {
const { sFieldValidation: sFieldValidationOld, sName } = sFieldConfigArr[0];
- if(commonUtils.isNotEmptyObject(sFieldValidationOld)) {
+ if (commonUtils.isNotEmptyObject(sFieldValidationOld)) {
const [length1, length2] = sFieldValidationOld.split(',');
- if(commonUtils.isNotEmptyNumber(length2)) {
+ if (commonUtils.isNotEmptyNumber(length2)) {
tableDataTotal[sumItem.sName] = commonUtils.convertFixNum(commonUtils.convertToNum(tableDataTotal[sumItem.sName]) +
commonUtils.convertToNum(tableDataRow[sumItem.sName]), this.props.getFloatNum(length2));
}
- }else {
+ } else {
tableDataTotal[sumItem.sName] = commonUtils.convertFixNum(commonUtils.convertToNum(tableDataTotal[sumItem.sName]) +
commonUtils.convertToNum(tableDataRow[sumItem.sName]), this.props.getFloatNum(sumItem.sName));
}
@@ -4727,11 +4747,11 @@ class CommonTableRc extends React.Component {
const sumConfig = config.gdsconfigformslave.filter(item => item.sName !== '' && item.bVisible && item.bSum);
if (commonUtils.isNotEmptyArr(sumConfig)) {
if (commonUtils.isNotEmptyObject(config) && commonUtils.isNotEmptyArr(dataSource)) {
- const { selectedRowKeys } =this.state;
+ const { selectedRowKeys } = this.state;
/* 生产排程对选中行进行汇总 */
- if(commonUtils.isNotEmptyArr(selectedRowKeys)) {
+ if (commonUtils.isNotEmptyArr(selectedRowKeys)) {
const selectedData = dataSource.filter(item => selectedRowKeys.includes(item.sSlaveId));
- if(commonUtils.isNotEmptyArr(selectedData)) {
+ if (commonUtils.isNotEmptyArr(selectedData)) {
selectedData.forEach((tableDataRow) => {
sumConfig.forEach((sumItem) => {
if (tableDataRow.handleType !== 'del') {
@@ -4776,10 +4796,10 @@ class CommonTableRc extends React.Component {
handleSumChildColumn = (config, dataSource) => {
const tableDataTotal = {};
- const { filteredValue } =this.state;
+ const { filteredValue } = this.state;
const sumConfig = config.gdsconfigformslave.filter(item => item.sName !== '' && item.bVisible && item.bSum);
if (commonUtils.isNotEmptyArr(sumConfig)) {
- if (commonUtils.isNotEmptyObject(config) && commonUtils.isNotEmptyArr(dataSource) && commonUtils.isNotEmptyArr(filteredValue)) {
+ if (commonUtils.isNotEmptyObject(config) && commonUtils.isNotEmptyArr(dataSource) && commonUtils.isNotEmptyArr(filteredValue)) {
/* 序号根据sSqlConditonId分组 序号重排 */
const groupedData = commonUtils.groupBy(dataSource, item => item.sSqlConditionId);
let selectedData = [];
@@ -4789,14 +4809,14 @@ class CommonTableRc extends React.Component {
if (commonUtils.isNotEmptyArr(eachData)) {
/* 看当前选中在哪个组里 */
const iIndex = eachData.findIndex(item => filteredValue.includes(item.sSqlConditionId));
- if(iIndex > -1){
+ if (iIndex > -1) {
selectedData = eachData;
}
}
}
}
- if(commonUtils.isNotEmptyArr(selectedData)) {
+ if (commonUtils.isNotEmptyArr(selectedData)) {
selectedData.forEach((tableDataRow) => {
sumConfig.forEach((sumItem) => {
if (tableDataRow.handleType !== 'del') {
@@ -4825,7 +4845,7 @@ class CommonTableRc extends React.Component {
}
// 表格按钮点击后调用指令集
handleInstruct = (btnName, callback) => {
- const { sInstruct:sInstructStr } = this.props.config;
+ const { sInstruct: sInstructStr } = this.props.config;
const sInstruct = commonUtils.convertStrToObj(sInstructStr, {});
const { data = [] } = sInstruct;
@@ -4871,19 +4891,19 @@ class CommonTableRc extends React.Component {
if (commonUtils.isNotEmptyObject(this.props.tableProps.chooseProcessConfigRow)) {
this.handleInstruct('BtnChooseProcess', () => {
const iIndex = this.props.tableProps.chooseProcessConfigRow;
- if(this.props.name === 'slave0Child1') {
- const { name } = this.props;
- let btnPupopConfig = this.props.tableProps.chooseProcessConfigRow;
- this.setState({
- commonPopupVisible: true,
- commonPopupTbName: name,
- commonPopupShowConfig: btnPupopConfig,
- commonPopupRecord: record,
- });
-
- } else {
- this.props.onBtnChoose('process', 'BtnChooseProcess', iIndex);
- }
+ if (this.props.name === 'slave0Child1') {
+ const { name } = this.props;
+ let btnPupopConfig = this.props.tableProps.chooseProcessConfigRow;
+ this.setState({
+ commonPopupVisible: true,
+ commonPopupTbName: name,
+ commonPopupShowConfig: btnPupopConfig,
+ commonPopupRecord: record,
+ });
+
+ } else {
+ this.props.onBtnChoose('process', 'BtnChooseProcess', iIndex);
+ }
});
}
};
@@ -4910,7 +4930,7 @@ class CommonTableRc extends React.Component {
handleAddRow = (index, bModalAdd) => {
this.stopRowClick = true;
/* 多表树形删除 */
- if(this.props && this.props.slaveInfo && this.props.slaveInfo.tableProps && this.props.slaveInfo.tableProps.bSlaveInfo) {
+ if (this.props && this.props.slaveInfo && this.props.slaveInfo.tableProps && this.props.slaveInfo.tableProps.bSlaveInfo) {
this.handleAddInfoRow(index);
return;
}
@@ -4961,10 +4981,10 @@ class CommonTableRc extends React.Component {
}, 0)
};
handleTreeDel = (index, record) => {
- if(this.props.name === 'control') {
- const sureDel = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'SureDel') : '确认要删除吗?' ;
- const BtnSure = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'BtnSure') : '确定?' ;
- const BtnCancel = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'BtnCancel') : '确定?' ;
+ if (this.props.name === 'control') {
+ const sureDel = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'SureDel') : '确认要删除吗?';
+ const BtnSure = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'BtnSure') : '确定?';
+ const BtnCancel = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'BtnCancel') : '确定?';
const _this = this;
confirm({
title: sureDel,
@@ -4988,7 +5008,7 @@ class CommonTableRc extends React.Component {
this.props.onTreeDel(this.props.name, true, '');
}
});
- },0);
+ }, 0);
};
/** 复制 */
handleCopyRow = (index) => {
@@ -4998,7 +5018,7 @@ class CommonTableRc extends React.Component {
this.props.onCopyRow(this.props.name, undefined, undefined, index);
}
});
- },0)
+ }, 0)
};
/** 复制全部 */
handleCopyAllRow = () => {
@@ -5012,10 +5032,10 @@ class CommonTableRc extends React.Component {
};
/** 删除行 */
handleDelRow = (index, record) => {
- if(this.props.name !== 'slaveFilter') {
- const sureDel = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'SureDel') : '确认要删除吗?' ;
- const BtnSure = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'BtnSure') : '确定?' ;
- const BtnCancel = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'BtnCancel') : '确定?' ;
+ if (this.props.name !== 'slaveFilter') {
+ const sureDel = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'SureDel') : '确认要删除吗?';
+ const BtnSure = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'BtnSure') : '确定?';
+ const BtnCancel = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'BtnCancel') : '确定?';
const _this = this;
confirm({
title: sureDel,
@@ -5036,13 +5056,13 @@ class CommonTableRc extends React.Component {
/** 删除行 */
handleDelOkRow = (index, record) => {
const tableSelectedRowKeys = [];
- if(this.props?.formId === '12710101117043535363530') {
+ if (this.props?.formId === '12710101117043535363530') {
tableSelectedRowKeys.push(record[this.rowKey]);
} else {
tableSelectedRowKeys.push(record.sId);
}
/* 多表树形删除 */
- if(this.props && this.props.slaveInfo && this.props.slaveInfo.tableProps && this.props.slaveInfo.tableProps.bSlaveInfo) {
+ if (this.props && this.props.slaveInfo && this.props.slaveInfo.tableProps && this.props.slaveInfo.tableProps.bSlaveInfo) {
this.handleDelInfoRow(index, record);
return;
}
@@ -5074,7 +5094,7 @@ class CommonTableRc extends React.Component {
/** 复制 */
handleCopyMoreRow = (index) => {
- this.setState({ bOperateMoreVisible : true});
+ this.setState({ bOperateMoreVisible: true });
};
/** 提取数据 */
@@ -5098,24 +5118,24 @@ class CommonTableRc extends React.Component {
let btnPupopConfig = {};
if (commonUtils.isNotEmptyArr(config) && commonUtils.isNotEmptyArr(config.gdsconfigformslave)) {
let controlConfig = config.gdsconfigformslave.filter(item => commonUtils.isNotEmptyObject(item.sControlName) && (item.sControlName.includes('BtnPopup') || item.sControlName.includes('BtnHeadPopup')));
- if(btnName && typeof btnName === 'string') {
- controlConfig = config.gdsconfigformslave.filter(item => commonUtils.isNotEmptyObject(item.sControlName) && item.sControlName === btnName);
+ if (btnName && typeof btnName === 'string') {
+ controlConfig = config.gdsconfigformslave.filter(item => commonUtils.isNotEmptyObject(item.sControlName) && item.sControlName === btnName);
}
if (commonUtils.isNotEmptyArr(controlConfig)) {
if (controlConfig[0].bVisible && controlConfig[0].sDropDownType === 'popup') {
btnPupopConfig = controlConfig[0];
const conditionValue = this.props.getSqlCondition(btnPupopConfig);
- if(commonUtils.isNotEmptyObject(conditionValue)) {
- if(commonUtils.isNotEmptyObject(conditionValue.warning)) {
+ if (commonUtils.isNotEmptyObject(conditionValue)) {
+ if (commonUtils.isNotEmptyObject(conditionValue.warning)) {
message.warn(conditionValue.warning);
return;
}
}
this.setState({
- commonPopupVisible:true,
- commonPopupTbName:name,
- commonPopupShowConfig:btnPupopConfig,
- commonPopupRecord:record,
+ commonPopupVisible: true,
+ commonPopupTbName: name,
+ commonPopupShowConfig: btnPupopConfig,
+ commonPopupRecord: record,
});
}
}
@@ -5223,7 +5243,7 @@ class CommonTableRc extends React.Component {
/* 查询控件名是否存在 */
if (commonUtils.isNotEmptyArr(props.config) && commonUtils.isNotEmptyArr(props.config.gdsconfigformslave) && commonUtils.isNotEmptyStr(controlName)) {
const controlConfig = props.config.gdsconfigformslave.filter(item => item.sControlName === controlName);
- ret = commonUtils.isEmptyArr(controlConfig) ? ( propsIcon ? true : false ) : commonUtils.converStrToBoolean(controlConfig[0].bVisible);
+ ret = commonUtils.isEmptyArr(controlConfig) ? (propsIcon ? true : false) : commonUtils.converStrToBoolean(controlConfig[0].bVisible);
}
/* 返回值 */
return ret;
@@ -5239,7 +5259,7 @@ class CommonTableRc extends React.Component {
if (commonUtils.isNotEmptyArr(props.config) && commonUtils.isNotEmptyArr(props.config.gdsconfigformslave) && commonUtils.isNotEmptyStr(controlName)) {
const controlConfig = props.config.gdsconfigformslave.filter(item => item.sControlName === controlName);
ret = commonUtils.isNotEmptyArr(controlConfig) && commonUtils.converStrToBoolean(controlConfig[0].iTag === 3);
- if(ret && controlName === 'BtnUpload' && Array.isArray(controlConfig)) {
+ if (ret && controlName === 'BtnUpload' && Array.isArray(controlConfig)) {
this.BtnUploadDivPropsAttr.current = controlConfig[0];
}
}
@@ -5283,41 +5303,41 @@ class CommonTableRc extends React.Component {
<>
{res}
}
- size="large"
- style={{
- position: "absolute",
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- top: 0,
- right: 0,
- height: 15
- }}
- onClick={this.props.onMoveLine.bind(this, {
- index,
- direction: "up"
- })}
- />
- }
- size="large"
- style={{
- position: "absolute",
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- bottom: 0,
- right: 0,
- height: 15
- }}
- onClick={this.props.onMoveLine.bind(this, {
- index,
- direction: "down"
- })}
- />
+ type="link"
+ icon={}
+ size="large"
+ style={{
+ position: "absolute",
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
+ top: 0,
+ right: 0,
+ height: 15
+ }}
+ onClick={this.props.onMoveLine.bind(this, {
+ index,
+ direction: "up"
+ })}
+ />
+ }
+ size="large"
+ style={{
+ position: "absolute",
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
+ bottom: 0,
+ right: 0,
+ height: 15
+ }}
+ onClick={this.props.onMoveLine.bind(this, {
+ index,
+ direction: "down"
+ })}
+ />
>);
} else {
return res;
@@ -5338,7 +5358,7 @@ class CommonTableRc extends React.Component {
return '';
}
const showConfigObj = this.getShowConfig(props, sName, isSlaveInfo);
- const { dNetMoney, dNetPrice } = props.app.decimals;
+ const { dNetMoney, dNetPrice } = props.app.decimals;
let bShow = '';
/* 如果是布尔类型 ,加checkbox */
if (commonUtils.isNotEmptyObject(sName) && sName.substring(0, 1) === 'b') {
@@ -5358,7 +5378,7 @@ class CommonTableRc extends React.Component {
const officeFileTypeList = ['PDF', 'DOCX', 'XLSX', 'MP4', 'WEBM', 'OGG'];
const imgTypeList = ['PNG', 'SVG', 'JPG', 'JPEG', 'GIF', 'BMP', 'TIFF', 'ICO'];
const officeFileType = picAddr[0].split('.').pop().toUpperCase();
- let fileIcon = ;
+ let fileIcon = ;
if (officeFileType === 'DOCX') {
fileIcon = ;
} else if (officeFileType === 'XLSX') {
@@ -5370,11 +5390,11 @@ class CommonTableRc extends React.Component {
imgBox = {
- this.setState({
- officePreviewVisible: true,
- officeFileUrl: picAddr[0]
- })
- }}>{fileIcon}
+ this.setState({
+ officePreviewVisible: true,
+ officeFileUrl: picAddr[0]
+ })
+ }}>{fileIcon}
} else if (imgTypeList.includes(officeFileType)) {
imgBox =
0} onClick={e => this.handlePreviewImage(e, picAddr)} style={{ width: '30px', height: '20px' }} />;
} else {
@@ -5383,13 +5403,13 @@ class CommonTableRc extends React.Component {
}
}
/* 变量设置 显示字段名 */
- let specialTitle ='';
+ let specialTitle = '';
let bSpecialTitle = false;
- if(sName!=='' && sName.includes('sValue')){
- specialTitle =`R${idx}_${sName}`;
- }else if(location.pathname?.includes('production') && (sName === 'sStateName' || sName==='sProcessState')) {
- if(commonUtils.isNotEmptyObject(record?.sState) || commonUtils.isNotEmptyObject(record?.sStateName)) {
- specialTitle = commonUtils.isNotEmptyObject(record.sWorkOrderChangeMemo)? record.sWorkOrderChangeMemo : '';
+ if (sName !== '' && sName.includes('sValue')) {
+ specialTitle = `R${idx}_${sName}`;
+ } else if (location.pathname?.includes('production') && (sName === 'sStateName' || sName === 'sProcessState')) {
+ if (commonUtils.isNotEmptyObject(record?.sState) || commonUtils.isNotEmptyObject(record?.sStateName)) {
+ specialTitle = commonUtils.isNotEmptyObject(record.sWorkOrderChangeMemo) ? record.sWorkOrderChangeMemo : '';
bSpecialTitle = true;
}
}
@@ -5449,27 +5469,27 @@ class CommonTableRc extends React.Component {
/* 取小数点位数 */
let point = 0;
let strIndex = sDateFormat.indexOf('.');
- if(strIndex > -1 && sDateFormat.length > 1) {
+ if (strIndex > -1 && sDateFormat.length > 1) {
point = sDateFormat.substring(strIndex + 1, sDateFormat.length).length;
- if(commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
+ if (commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
const dConfigResult = commonUtils.convertFixNum(Number(sValue), point).toFixed(point);
- if(!isNaN(dConfigResult)) {
+ if (!isNaN(dConfigResult)) {
sValue = dConfigResult;
}
}
}
} else {
if (firstDataIndex === 'd' && sName.toLowerCase().endsWith('price')) { /* 列表单价格式化显示 */
- if(commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
+ if (commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
const dResult = commonUtils.convertFixNum(Number(sValue), dNetPrice).toFixed(dNetPrice);
- if(!isNaN(dResult)) {
+ if (!isNaN(dResult)) {
sValue = dResult;
}
}
} else if (firstDataIndex === 'd' && sName.toLowerCase().endsWith('money')) { /* 列表金额格式化显示 */
- if(commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
+ if (commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
const dResult = commonUtils.convertFixNum(Number(sValue), dNetMoney).toFixed(dNetMoney);
- if(!isNaN(dResult)) {
+ if (!isNaN(dResult)) {
sValue = dResult;
}
}
@@ -5478,9 +5498,9 @@ class CommonTableRc extends React.Component {
}
/* 如果列表行包含sDivRow并且sDivRow有值 则代表该行行不渲染数据 只做分割作用 */
- if(commonUtils.isNotEmptyObject(record.sDivRow) && record.bInsert) {
+ if (commonUtils.isNotEmptyObject(record.sDivRow) && record.bInsert) {
bShow = '';
- if(sName !=='sDivRow') {
+ if (sName !== 'sDivRow') {
sValue = '';
}
}
@@ -5506,32 +5526,32 @@ class CommonTableRc extends React.Component {
}
}
- if (cellColor && sName !=='sState') {
+ if (cellColor && sName !== 'sState') {
res = (
{(commonUtils.isNotEmptyObject(sName) && sName.substring(0, 1) === 'b') || (imgBox !== '') ? '' :
this.onKeyDownDiv(e, sName)}
onCut={e => e.preventDefault()}
onPaste={e => e.preventDefault()}
suppressContentEditableWarning
contentEditable="true"
onClick={commonUtils.isNotEmptyObject(linkStyle) ? this.handleViewClick.bind(this, isSlaveInfo ? 'slaveInfo' : this.props.name, showConfig.sName, record, index, showConfig) : null}
- > { sValue}
}
+ > {sValue}
}
{bShow}{imgBox}
);
} else {
res = (
this.onKeyDownDiv(e, sName)}
onCut={e => e.preventDefault()}
onPaste={e => e.preventDefault()}
suppressContentEditableWarning
contentEditable="true"
onClick={commonUtils.isNotEmptyObject(linkStyle) ? this.handleViewClick.bind(this, isSlaveInfo ? 'slaveInfo' : this.props.name, showConfig.sName, record, index, showConfig) : null}
- > {sValue}
+ > {sValue}
}
- {bShow}{imgBox}{this.handleGetFastSearchBtn({record, sName, isSlaveInfo})}
+ {bShow}{imgBox}{this.handleGetFastSearchBtn({ record, sName, isSlaveInfo })}
);
}
const cell = this.mergeTableCell(res, idx, sName, isSlaveInfo);
return cell;
- } else if ( commonUtils.isNotEmptyObject(showConfigObj) && !showConfigObj.bReadonly && (props.enabled || showConfigObj.iTag === 3 )
+ } else if (commonUtils.isNotEmptyObject(showConfigObj) && !showConfigObj.bReadonly && (props.enabled || showConfigObj.iTag === 3)
&& commonUtils.isEmptyObject(record.sDivRowNew) && (commonUtils.isNotEmptyArr(props.selectedRowKeys)
&& props.selectedRowKeys.toString().includes(record.sId) || props.name === 'sParam'
- || ( props.name ==='slaveInfo' && commonUtils.isNotEmptyArr(props.selectedRowKeys) && props.selectedRowKeys.toString().includes(record.sSlaveId) && showConfigObj.iTag === 3 ))
+ || (props.name === 'slaveInfo' && commonUtils.isNotEmptyArr(props.selectedRowKeys) && props.selectedRowKeys.toString().includes(record.sSlaveId) && showConfigObj.iTag === 3))
|| (this.getShowTypeProps(props, text, record, sName)?.enabled && record.sId === this.state.currentHoverSid)
|| (false && location.pathname.includes('productionScheduleTree') && this.getShowTypeProps(props, text, record, sName)?.enabled && record.sId === props.rowHoverSid)
|| (props.rootType === 'list' && props.selectedRowKeys.toString().includes(record.sSlaveId))) {
@@ -5594,7 +5614,7 @@ class CommonTableRc extends React.Component {
let backgroundColor = '';
if (commonUtils.isNotEmptyArr(showConfig)) {
const cellStyle = this.getCellColorConfig(text, record, sName);
- if (commonUtils.isNotEmptyObject(cellStyle.styleColorArrTotal) || commonUtils.isNotEmptyObject(cellStyle.styleColorArrTotalB) ) {
+ if (commonUtils.isNotEmptyObject(cellStyle.styleColorArrTotal) || commonUtils.isNotEmptyObject(cellStyle.styleColorArrTotalB)) {
cellColor = cellStyle.styleColorArrTotal;
backgroundColor = cellStyle.styleColorArrTotalB;
}
@@ -5619,27 +5639,27 @@ class CommonTableRc extends React.Component {
/* 取小数点位数 */
let point = 0;
let strIndex = sDateFormat.indexOf('.');
- if(strIndex > -1 && sDateFormat.length > 1) {
+ if (strIndex > -1 && sDateFormat.length > 1) {
point = sDateFormat.substring(strIndex + 1, sDateFormat.length).length;
- if(commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
+ if (commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
const dConfigResult = commonUtils.convertFixNum(Number(sValue), point).toFixed(point);
- if(!isNaN(dConfigResult)) {
+ if (!isNaN(dConfigResult)) {
sValue = dConfigResult;
}
}
}
} else {
if (firstDataIndex === 'd' && sName.toLowerCase().endsWith('price')) { /* 列表单价格式化显示 */
- if(commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
+ if (commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
const dResult = commonUtils.convertFixNum(Number(sValue), dNetPrice).toFixed(dNetPrice);
- if(!isNaN(dResult)) {
+ if (!isNaN(dResult)) {
sValue = dResult;
}
}
} else if (firstDataIndex === 'd' && sName.toLowerCase().endsWith('money')) { /* 列表金额格式化显示 */
- if(commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
+ if (commonUtils.isNotEmptyNumber(sValue) && sValue !== null) {
const dResult = commonUtils.convertFixNum(Number(sValue), dNetMoney).toFixed(dNetMoney);
- if(!isNaN(dResult)) {
+ if (!isNaN(dResult)) {
sValue = dResult;
}
}
@@ -5656,7 +5676,7 @@ class CommonTableRc extends React.Component {
if (typeof showConfig.showDropDown === 'object') {
showDropDown = showConfig.showDropDown;
} else {
- if(commonUtils.isJSON(showConfig.showDropDown)) {
+ if (commonUtils.isJSON(showConfig.showDropDown)) {
showDropDown = commonUtils.objectToArr(commonUtils.convertStrToObj(showConfig.showDropDown));
}
}
@@ -5669,11 +5689,11 @@ class CommonTableRc extends React.Component {
let clickEvent = '';
/* 选择合版产品弹窗 */
const sModelsType = commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) ? props.app.currentPane.sModelsType : '';
- const combinedInfo = commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) ? commonFunc.showMessage(props.app.commonConst, 'CombinedInfo') : '合版信息' ;
+ const combinedInfo = commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) ? commonFunc.showMessage(props.app.commonConst, 'CombinedInfo') : '合版信息';
- const pleaseSelect = commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'pleaseSelect') : '请选择' ;
+ const pleaseSelect = commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'pleaseSelect') : '请选择';
- if (commonUtils.isNotEmptyObject(sName) && ( sName === 'sCombinedMemo' || sName ==='sCombineProductNameNew' || sName === 'sColorSerialMemo' || sName === 'sPositiveColor' || sName === 'sOppositeColor' || sName === 'sParams' || sName === 'sParamsNew'|| sName === 'sQuoParams' || (commonUtils.isNotEmptyObject(sModelsType) && !sModelsType.includes('Set') && sName === 'sCombinePartsNameNew'))) {
+ if (commonUtils.isNotEmptyObject(sName) && (sName === 'sCombinedMemo' || sName === 'sCombineProductNameNew' || sName === 'sColorSerialMemo' || sName === 'sPositiveColor' || sName === 'sOppositeColor' || sName === 'sParams' || sName === 'sParamsNew' || sName === 'sQuoParams' || (commonUtils.isNotEmptyObject(sModelsType) && !sModelsType.includes('Set') && sName === 'sCombinePartsNameNew'))) {
linkStyle = 'linksActiveIdStyle';
clickEvent = 'onViewChoose';
if (sName === 'sCombinedMemo') {
@@ -5716,7 +5736,7 @@ class CommonTableRc extends React.Component {
sMemo = commonUtils.isNotEmptyObject(sMemo) ? sMemo.substr(0, sMemo.length - 1) : '';
sValue = sMemo;
}
- } else if (sName === 'sParams' || sName === 'sQuoParams' || sName === 'sParamsNew' ) {
+ } else if (sName === 'sParams' || sName === 'sQuoParams' || sName === 'sParamsNew') {
if (props.onGetParamsValue) {
// 页面自行处理sparams的sValue
sValue = props.onGetParamsValue({ sName, sValue, record });
@@ -5737,7 +5757,7 @@ class CommonTableRc extends React.Component {
let sParamStr = '';
if (commonUtils.isNotEmptyArr(JsonData)) {
JsonData.forEach((item) => {
- if(item.bSelfCbx) {
+ if (item.bSelfCbx) {
const strValue = commonUtils.isNotEmptyObject(item.sParamValue) ? item.sParamValue : '';
sParamStr += `${item.sParamName}:${strValue},`;
}
@@ -5750,13 +5770,13 @@ class CommonTableRc extends React.Component {
}
}
sValue = commonUtils.isEmpty(sValue) ? sName === 'sCombinedMemo' ? combinedInfo : pleaseSelect : sValue;
- } else if ((!props.enabled) && sName.indexOf('Memo') > -1 && showConfigObj.iTag !== 3 ) {
+ } else if ((!props.enabled) && sName.indexOf('Memo') > -1 && showConfigObj.iTag !== 3) {
linkStyle = 'linksActiveIdStyle';
clickEvent = 'onMemoShow';
sValue = commonUtils.isEmpty(sValue) ? '' : sValue;
const regex = /<[^>]*>/g;
sValue = sValue.replace(regex, '');
- } else if ((!props.enabled) && showConfigObj.sControlName && showConfigObj.sControlName.toLowerCase().indexOf('memo') > -1 && showConfigObj.iTag !== 3 ) {
+ } else if ((!props.enabled) && showConfigObj.sControlName && showConfigObj.sControlName.toLowerCase().indexOf('memo') > -1 && showConfigObj.iTag !== 3) {
linkStyle = 'linksActiveIdStyle';
clickEvent = 'onMemoShow';
sValue = commonUtils.isEmpty(sValue) ? '' : sValue;
@@ -5767,43 +5787,43 @@ class CommonTableRc extends React.Component {
clickEvent = 'onOpenPopupModal';
}
/* 如果列表行包含sDivRow并且sDivRow有值 则代表该行行不渲染数据 只做分割作用 */
- if(commonUtils.isNotEmptyObject(record.sDivRowNew) && record.bInsert) {
+ if (commonUtils.isNotEmptyObject(record.sDivRowNew) && record.bInsert) {
bShow = '';
// linkStyle = 'linksActiveIdStyle';
- if(sValue) {
+ if (sValue) {
const splitArr = sValue ? sValue.toString().split('F') : [];
- if(commonUtils.isNotEmptyArr(splitArr) && splitArr.length > 1) {
+ if (commonUtils.isNotEmptyArr(splitArr) && splitArr.length > 1) {
sValue =
{splitArr[0]} {splitArr[1]} ;
}
}
}
- let showQty='';
- if(!this.props.enabled && location.pathname.includes('quotationPackTableTree') && this.props.name === 'control' && sName === 'dSinglePQty') {
+ let showQty = '';
+ if (!this.props.enabled && location.pathname.includes('quotationPackTableTree') && this.props.name === 'control' && sName === 'dSinglePQty') {
showQty =
- } else if(sName === 'sSaveProName' || sName === 'sDeleteProName' || sName === 'sSaveProNameBefore' || sName === 'sProcName') {
+ } else if (sName === 'sSaveProName' || sName === 'sDeleteProName' || sName === 'sSaveProNameBefore' || sName === 'sProcName') {
/* 增删改存业务处理 加查看眼睛 */
- sValue =
{sValue}
- }else if(sName === 'dNeedAuxiliaryQty' && showConfig.sControlName && showConfig.sControlName !=='slaveInfo' ) { /* 净需求 */
+ sValue =
{sValue}
+ } else if (sName === 'dNeedAuxiliaryQty' && showConfig.sControlName && showConfig.sControlName !== 'slaveInfo') { /* 净需求 */
/* 增删改存业务处理 加查看眼睛 */
- sValue =
{sValue}
+ sValue =
{sValue}
}
/* 只读字段置灰 */
const isColorInclude = this.rowColorData.current?.find(i => i && i?.key === record?.[this.rowKey]);
let bReadonlyField = false;
- if((showConfig.bReadonly || showConfig.iTag ===1) && commonUtils.isEmptyStr(backgroundColor) && !isColorInclude) {
+ if ((showConfig.bReadonly || showConfig.iTag === 1) && commonUtils.isEmptyStr(backgroundColor) && !isColorInclude) {
backgroundColor = '#f1f2f8';
bReadonlyField = true;
}
- if (backgroundColor && !this.props.slaveInfo) {
+ if (backgroundColor && !this.props.slaveInfo) {
this.hasSpanBgColor = true;
}
res = (
{(commonUtils.isNotEmptyObject(sName) && sName.substring(0, 1) === 'b') || (imgBox !== '') ? '' :
{commonUtils.isNotEmptyObject(specialTitle) ? specialTitle :sValue}}
+ title={
{commonUtils.isNotEmptyObject(specialTitle) ? specialTitle : sValue}}
>
{ sValue}
+ > {sValue}
}{bShow}{imgBox}{showQty}
);
@@ -6074,13 +6094,13 @@ class CommonTableRc extends React.Component {
const productionRoute = (commonUtils.isNotEmptyObject(props.app.currentPane) && commonUtils.isNotEmptyObject(props.app.currentPane.route) && props.app.currentPane.route.includes('productionSchedule'));
if (productionRoute) { /* 生产排程对选中行进行汇总 */
this.handleSumOtherColumn(props.config, props.data);
- } else if(rootType === 'list') {
- if(commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyArr(props.totalData)) {
- const addState ={};
+ } else if (rootType === 'list') {
+ if (commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyArr(props.totalData)) {
+ const addState = {};
addState.totalData = props.totalData;
this.setState({ ...addState })
}
- } else if(name ==='slaveChild'){
+ } else if (name === 'slaveChild') {
this.handleSumChildColumn(props.config, props.data);
} else {
this.handleSumAllColumn(props.config, props.data);
@@ -6108,7 +6128,7 @@ class CommonTableRc extends React.Component {
if (stateValue.tableColumn[index].children && stateValue.tableColumn[index].children.length) {
const childrenSortArr = [];
const childrenDataIndexArr = [];
- item.children = item.children.map(child => { return {...child, ...{ sortIndex: sortArr.indexOf(child.dataIndex) }}}).sort(compare('sortIndex'));
+ item.children = item.children.map(child => { return { ...child, ...{ sortIndex: sortArr.indexOf(child.dataIndex) } } }).sort(compare('sortIndex'));
item.children.forEach((child, childIndex) => {
const currentSort = sortArr.indexOf(child.dataIndex);
if (childIndex === 0) {
@@ -6144,7 +6164,7 @@ class CommonTableRc extends React.Component {
}
});
stateValue.tableColumn = stateValue.tableColumn.filter(item => !item.delete); // 删除需要分割的双层表头
- stateValue.tableColumn = [ ...stateValue.tableColumn, ...addTableColumn ]; // 将分割后的双层表头加回去
+ stateValue.tableColumn = [...stateValue.tableColumn, ...addTableColumn]; // 将分割后的双层表头加回去
stateValue.tableColumn = stateValue.tableColumn.sort(compare('sortIndex'));
// 合并一级表头相同的相邻的column
stateValue.tableColumn = stateValue.tableColumn.reduce((prev, cur) => {
@@ -6197,7 +6217,7 @@ class CommonTableRc extends React.Component {
const footerHeight = commonUtils.isNotEmptyArr(this.state.totalData1) ? 58 : 29;
if (this.props.tableProps.AutoTableHeight) {
this.scrollY = this.props.tableProps.AutoTableHeight;
- this.tableHeight = this.props.tableProps.AutoTableHeight == '100%' ? '100%' : this.props.tableProps.AutoTableHeight + tableHeaderHeight + footerHeight;
+ this.tableHeight = this.props.tableProps.AutoTableHeight == '100%' ? '100%' : this.props.tableProps.AutoTableHeight + tableHeaderHeight + footerHeight;
return;
}
@@ -6221,19 +6241,19 @@ class CommonTableRc extends React.Component {
const tabHeight = 89;
const paginationHeight = this.props.tableProps.pagination ? 60 : 0;
let extraHeight = 0; /* 额外的区域 */
- if(commonUtils.isNotEmptyObject(location.pathname) && location.pathname.includes('commonListTab')) { /* 带Tab页签的列表 */
+ if (commonUtils.isNotEmptyObject(location.pathname) && location.pathname.includes('commonListTab')) { /* 带Tab页签的列表 */
/* 有从表高度100,没有高度20 */
const hasSlave = document.getElementsByClassName('hasSlave');
- if(commonUtils.isNotEmptyArr(hasSlave)) {
- extraHeight = 220;
- }else {
- extraHeight = 20;
+ if (commonUtils.isNotEmptyArr(hasSlave)) {
+ extraHeight = 220;
+ } else {
+ extraHeight = 20;
}
}
if (this.props?.masterConfig?.sTableColorTs) {
extraHeight += this.colorInfo?.getBoundingClientRect()?.height || 80;
- if(location.pathname?.includes('productionScheduleTree')) {
+ if (location.pathname?.includes('productionScheduleTree')) {
extraHeight -= 34;
}
} else {
@@ -6563,7 +6583,7 @@ class CommonTableRc extends React.Component {
message.warning('请确认复制的内容是文件类型!');
}
};
- handleGetFastSearchBtn = ({record, sName, isSlaveInfo}) => {
+ handleGetFastSearchBtn = ({ record, sName, isSlaveInfo }) => {
if (isSlaveInfo || !sName.startsWith('s') || this.props.name !== 'slave') {
return '';
}
@@ -6705,9 +6725,9 @@ class CommonTableRc extends React.Component {
}
}
/* 拖拽改变对应层级 */
- moveRow = (dragIndex, hoverIndex,dragKey,hoverKey) => {
- if(this.props.onMoveRow) {
- this.props.onMoveRow(dragIndex, hoverIndex,dragKey,hoverKey);
+ moveRow = (dragIndex, hoverIndex, dragKey, hoverKey) => {
+ if (this.props.onMoveRow) {
+ this.props.onMoveRow(dragIndex, hoverIndex, dragKey, hoverKey);
}
};
@@ -6762,7 +6782,7 @@ class CommonTableRc extends React.Component {
if (commonUtils.isNotEmptyObject(previewImage)) {
if (commonUtils.isNotEmptyArr(this.props.data)) {
if (this.props.data[0].sPicturePath) {
- for(const item of this.props.data) {
+ for (const item of this.props.data) {
const dataUrl = `${commonConfig.file_host}file/download?savePathStr=${item.sPicturePath}&sModelsId=100&token=${token}`; /* 缩略图 */
data.push(dataUrl);
}
@@ -6779,7 +6799,7 @@ class CommonTableRc extends React.Component {
onChange: this.handleUploadChange,
accept: '*/*',
showUploadList: false,
- multiple:true,
+ multiple: true,
beforeUpload: this.handleBeforeUpload,
};
/* 获取look的props */
@@ -6825,15 +6845,15 @@ class CommonTableRc extends React.Component {
const iIndex = config.gdsconfigformslave.findIndex(item => commonUtils.isNotEmptyObject(item.sControlName) && (item.sControlName.includes('BtnPopup') || item.sControlName.includes('BtnHeadPopup')) && item.bVisible && item.sDropDownType === 'popup');
if (iIndex > -1) {
commonPopupConfig = config.gdsconfigformslave[iIndex];
- if(commonPopupShowConfig?.sControlName === 'BtnPopupsAlumiteBomBillNo' || commonPopupShowConfig?.sControlName === 'BtnChooseProcess') {
+ if (commonPopupShowConfig?.sControlName === 'BtnPopupsAlumiteBomBillNo' || commonPopupShowConfig?.sControlName === 'BtnChooseProcess') {
commonPopupConfig = commonPopupShowConfig;
- if(commonPopupShowConfig?.sControlName === 'BtnChooseProcess') {
+ if (commonPopupShowConfig?.sControlName === 'BtnChooseProcess') {
bCommonPopupProcess = true;
}
}
commonPopupTitle = commonUtils.isNotEmptyObject(commonPopupConfig) && commonUtils.isNotEmptyObject(commonPopupConfig.sActiveName) ? commonPopupConfig.sActiveName : commonPopupTitle;
- commonPopupTitle = commonUtils.isNotEmptyObject(commonPopupRecord) ? ( commonPopupConfig.sActiveId === '1' ? commonUtils.isEmpty(commonPopupRecord.sSrcFormName) ? commonPopupTitle : commonPopupRecord.sSrcFormName : commonPopupTitle ) : commonPopupTitle;
- const sFormId = commonUtils.isNotEmptyObject(commonPopupRecord) ? ( commonPopupConfig.sActiveId === '1' ? commonUtils.isEmpty(commonPopupRecord.sFormId) ? commonPopupRecord.sSrcFormId : commonPopupRecord.sFormId : commonPopupConfig.sActiveId ) : commonPopupConfig.sActiveId;
+ commonPopupTitle = commonUtils.isNotEmptyObject(commonPopupRecord) ? (commonPopupConfig.sActiveId === '1' ? commonUtils.isEmpty(commonPopupRecord.sSrcFormName) ? commonPopupTitle : commonPopupRecord.sSrcFormName : commonPopupTitle) : commonPopupTitle;
+ const sFormId = commonUtils.isNotEmptyObject(commonPopupRecord) ? (commonPopupConfig.sActiveId === '1' ? commonUtils.isEmpty(commonPopupRecord.sFormId) ? commonPopupRecord.sSrcFormId : commonPopupRecord.sFormId : commonPopupConfig.sActiveId) : commonPopupConfig.sActiveId;
commonPopupProps = {
app: {
@@ -6843,13 +6863,13 @@ class CommonTableRc extends React.Component {
bEdit: (commonUtils.isNotEmptyObject(app.currentPane) && commonUtils.isNotEmptyObject(app.currentPane.route) && app.currentPane.route.includes('commonBillDeliver')),
config: commonPopupConfig,
conditonValues: this.props.getSqlCondition(commonPopupConfig),
- title:commonPopupTitle,
+ title: commonPopupTitle,
route: '/indexPage/commonList',
formRoute: '/indexPage/commonList',
formId: sFormId,
key: sModelsId + commonPopupConfig.sId,
sModelsType: bCommonPopupProcess ? 'search/commonProcess' : 'search/commonPopup',
- select:this.handleSelectCommonPopup,
+ select: this.handleSelectCommonPopup,
selectCancel: this.handleSelectCancel.bind(this, 'commonPopupVisible'),
},
},
@@ -6863,13 +6883,13 @@ class CommonTableRc extends React.Component {
}
/* 多列弹出窗 */
- const commonPopupIndex = config.gdsconfigformslave.findIndex(item => commonUtils.isNotEmptyObject(item.sControlName) && (item.sControlName.includes('BtnPopup') || item.sControlName.includes('BtnHeadPopup') ) && !['BtnPopup1'].includes(item.sControlName) && !item.sControlName.startsWith('BtnPopupEdit') && item.bVisible && item.sDropDownType === 'popup');
+ const commonPopupIndex = config.gdsconfigformslave.findIndex(item => commonUtils.isNotEmptyObject(item.sControlName) && (item.sControlName.includes('BtnPopup') || item.sControlName.includes('BtnHeadPopup')) && !['BtnPopup1'].includes(item.sControlName) && !item.sControlName.startsWith('BtnPopupEdit') && item.bVisible && item.sDropDownType === 'popup');
if (commonPopupIndex > -1) {
bCommonPopup = true;
}
/* 单列弹出窗 */
- const commonPopupIndex1 = config.gdsconfigformslave.findIndex(item => commonUtils.isNotEmptyObject(item.sControlName) && item.sControlName.includes('BtnPopup1') && item.bVisible && item.sDropDownType === 'popup');
+ const commonPopupIndex1 = config.gdsconfigformslave.findIndex(item => commonUtils.isNotEmptyObject(item.sControlName) && item.sControlName.includes('BtnPopup1') && item.bVisible && item.sDropDownType === 'popup');
if (commonPopupIndex1 > -1) {
bCommonPopup1 = true;
bCommonPopup = false;
@@ -6906,7 +6926,7 @@ class CommonTableRc extends React.Component {
}
if (iIndex > -1) {
- if(commonFieldPopupConfig.sDropDownType === 'popupSingle') { /* 如果下拉类型是单列弹出窗 则为单列 */
+ if (commonFieldPopupConfig.sDropDownType === 'popupSingle') { /* 如果下拉类型是单列弹出窗 则为单列 */
bFieldPopup = false;
}
commonFieldPopupTitle = commonUtils.isNotEmptyObject(commonFieldPopupConfig) && commonUtils.isNotEmptyObject(commonFieldPopupConfig.sActiveName) ? commonFieldPopupConfig.sActiveName : commonFieldPopupTitle;
@@ -6916,13 +6936,13 @@ class CommonTableRc extends React.Component {
currentPane: {
name: 'commonPopup',
config: commonFieldPopupConfig,
- title:commonFieldPopupTitle,
+ title: commonFieldPopupTitle,
route: '/indexPage/commonList',
formRoute: '/indexPage/commonList',
formId: commonFieldPopupConfig.sActiveId,
key: sModelsId + commonFieldPopupConfig.sId,
sModelsType: 'search/commonPopup',
- select:this.handleSelectCommonFieldPopup,
+ select: this.handleSelectCommonFieldPopup,
selectCancel: this.handleSelectCancel.bind(this, 'commonFieldPopupVisible'),
},
},
@@ -6958,25 +6978,25 @@ class CommonTableRc extends React.Component {
const { config, sModelsId, app, selectedRowKeys, enabled } = this.props;
if (commonUtils.isNotEmptyObject(config)) {
commonModalTitle = commonUtils.isNotEmptyObject(commonModalShowConfig) && commonUtils.isNotEmptyObject(commonModalShowConfig.sActiveName) ? commonModalShowConfig.sActiveName : commonModalTitle;
- const sFormId = commonUtils.isNotEmptyObject(commonModalRecord) && commonUtils.isNotEmptyObject(commonModalShowConfig) ? ( commonModalShowConfig.sActiveId === '1' ? commonUtils.isEmpty(commonModalRecord.sFormId) ? commonModalRecord.sSrcFormId : commonModalRecord.sFormId : commonModalShowConfig.sActiveId ) : commonModalShowConfig?.sActiveId;
+ const sFormId = commonUtils.isNotEmptyObject(commonModalRecord) && commonUtils.isNotEmptyObject(commonModalShowConfig) ? (commonModalShowConfig.sActiveId === '1' ? commonUtils.isEmpty(commonModalRecord.sFormId) ? commonModalRecord.sSrcFormId : commonModalRecord.sFormId : commonModalShowConfig.sActiveId) : commonModalShowConfig?.sActiveId;
commonModalProps = {
app: {
...this.props.app,
currentPane: {
name: 'commonModal',
- bEdit: commonModalShowConfig?.sName === 'dStockAuxiliaryQty'? enabled:false,
+ bEdit: commonModalShowConfig?.sName === 'dStockAuxiliaryQty' ? enabled : false,
config: commonModalShowConfig,
- conditonValues: commonModalShowConfig ? this.props.getSqlCondition(commonModalShowConfig, this.props.name, commonModalRecord) :{},
- title:commonModalTitle,
+ conditonValues: commonModalShowConfig ? this.props.getSqlCondition(commonModalShowConfig, this.props.name, commonModalRecord) : {},
+ title: commonModalTitle,
route: '/indexPage/commonList',
formRoute: '/indexPage/commonList',
formId: sFormId,
key: sModelsId + commonModalShowConfig?.sId,
sModelsType: 'search/commonPopup',
- select:this.handleSelectCommonPopup,
+ select: this.handleSelectCommonPopup,
selectCancel: this.handleSelectCancel.bind(this, 'commonModalVisible'),
- slaveDataSource :commonModalShowConfig?.sName === 'dStockAuxiliaryQty'? [commonModalRecord]: [],
+ slaveDataSource: commonModalShowConfig?.sName === 'dStockAuxiliaryQty' ? [commonModalRecord] : [],
},
},
dispatch: this.props.dispatch,
@@ -6985,7 +7005,7 @@ class CommonTableRc extends React.Component {
onOpenNewTab: this.onOpenNewTab,
outerMasterData: this.props.masterData,
realizeHeight: this.props.realizeHeight, /* 拖动偏移高度 */
- bEdit:commonModalShowConfig?.sName === 'dAvailableAuxiliaryQty'? enabled:false
+ bEdit: commonModalShowConfig?.sName === 'dAvailableAuxiliaryQty' ? enabled : false
};
// if(commonModalShowConfig?.sName === 'dSumCompleteAvailableStockQty' ){
// commonModalProps.data = commonModalData;
@@ -7073,7 +7093,7 @@ class CommonTableRc extends React.Component {
layoutScrollY = this.props.fixedHeight;
}
let bShowBtnUpload = true;
- if(commonUtils.isNotEmptyObject(this.props.masterData) && commonUtils.isNotEmptyObject(this.props.masterData.sZczlxShowName)) {
+ if (commonUtils.isNotEmptyObject(this.props.masterData) && commonUtils.isNotEmptyObject(this.props.masterData.sZczlxShowName)) {
bShowBtnUpload = this.props.masterData.sZczlxShowName !== '删除' && this.props.masterData.sZczlxShowName !== '恢复';
}
@@ -7085,11 +7105,11 @@ class CommonTableRc extends React.Component {
{
this.props.name === 'picFile' || (commonUtils.isNotEmptyObject(this.props.name) && this.props.name.indexOf('file') > -1) ||
- (this.props.name.startsWith('slave') && this.findIsUpdByControlName(this.props, 'BtnUpload') && bShowBtnUpload ) ?
+ (this.props.name.startsWith('slave') && this.findIsUpdByControlName(this.props, 'BtnUpload') && bShowBtnUpload) ?
- : null }
+ : null}
{
this.mydiv = ref;
if (this.mydiv) {
this.computedTdWidth();
if (false && commonUtils.isNotEmptyObject(location.pathname) && location.pathname.includes('commonListTab')) {
- this.mydiv.getElementsByClassName('ant-table-body')[0].style.height = this.tableHeight ? this.tableHeight + 'px': 80 + 'px';
+ this.mydiv.getElementsByClassName('ant-table-body')[0].style.height = this.tableHeight ? this.tableHeight + 'px' : 80 + 'px';
}
if (layoutScrollY) {
this.mydiv.getElementsByClassName('ant-table-body')[0].style.height = typeof layoutScrollY === 'number' ? layoutScrollY + 'px' : layoutScrollY;
@@ -7127,7 +7147,7 @@ class CommonTableRc extends React.Component {
- :
+ :
}
- { hasColorInfo &&
+ {hasColorInfo &&
this.colorInfo = e}>
-
+
- { tableProps.pagination && {this.onChange({ current: page, pageSize })}}
- /> }
+ onChange={(page, pageSize) => { this.onChange({ current: page, pageSize }) }}
+ />}
}
@@ -7207,27 +7227,27 @@ class CommonTableRc extends React.Component {
: ''
}{
- commonPopupVisible ?
-
- {bCommonPopup ?
-
- : bCommonPopup1 ?
-
- : bCommonPopupTree ?
- : ''
- }
-
- : ''
- }
+ commonPopupVisible ?
+
+ {bCommonPopup ?
+
+ : bCommonPopup1 ?
+
+ : bCommonPopupTree ?
+ : ''
+ }
+
+ : ''
+ }
{
commonFieldPopupVisible ?
{
+ () => {
const newList = [...commonFileDownloadList];
const checkState = newList.find(item => !item.checked);
newList.forEach(item => item.checked = checkState);
@@ -7347,27 +7367,27 @@ class CommonTableRc extends React.Component {
}
{
pdfFileVisible ?
- {
- this.setState({
- pdfFileVisible: false
- });
- }}
- >
-
- : ''
+ {
+ this.setState({
+ pdfFileVisible: false
+ });
+ }}
+ >
+
+ : ''
}
{
bOperateMoreVisible ?
@@ -7389,15 +7409,15 @@ class CommonTableRc extends React.Component {
{officePreviewVisible && }
{/* 简单对话框 */}
- { this.state.simpleModalVisible && this.setState({ simpleModalVisible: false, simpleModalWord: '' })}
+ onCancel={() => this.setState({ simpleModalVisible: false, simpleModalWord: '' })}
>
- }
+ }
);
}
@@ -7447,8 +7467,8 @@ const CommonTable = (props) => {
data[indexNew].iOrder = iOrder1;
const tempItem = data[index];
- data[index] = {...data[indexNew], handleType: data[indexNew].handleType || "update"};
- data[indexNew] = {...tempItem, handleType: tempItem.handleType || "update"};
+ data[index] = { ...data[indexNew], handleType: data[indexNew].handleType || "update" };
+ data[indexNew] = { ...tempItem, handleType: tempItem.handleType || "update" };
props.onSaveState({
[`${props.name}Data`]: data
@@ -7495,10 +7515,10 @@ const handleSetIRowNum = (data, props) => {
if (commonUtils.isNotEmptyArr(eachData)) {
eachData.forEach((item, index) => {
/* 采购 */
- item.iRowNum = index +1;
+ item.iRowNum = index + 1;
const iIndex = data.findIndex(row => row.sId === item.sId);
- if(iIndex > -1) {
- data[iIndex] ={...data[iIndex], iRowNum: index +1}
+ if (iIndex > -1) {
+ data[iIndex] = { ...data[iIndex], iRowNum: index + 1 }
}
});
@@ -7506,7 +7526,7 @@ const handleSetIRowNum = (data, props) => {
}
}
}
- if(location.pathname !== '/indexPage/commonClassify'){
+ if (location.pathname !== '/indexPage/commonClassify') {
if (commonUtils.isNotEmptyArr(item.children)) {
handleSetIRowNum(item.children, props);
}
diff --git a/src/components/Common/Typesetting/typesetting.js b/src/components/Common/Typesetting/typesetting.js
index aec3e59..3f523b4 100644
--- a/src/components/Common/Typesetting/typesetting.js
+++ b/src/components/Common/Typesetting/typesetting.js
@@ -1,7 +1,7 @@
/* eslint-disable */
import * as commonFunc from "@/components/Common/commonFunc";
import { DownOutlined, LeftOutlined, RightOutlined, UpOutlined, VerticalLeftOutlined, VerticalRightOutlined } from "@ant-design/icons";
-import { message, Modal } from "antd-v4";
+import { message, Modal } from "antd";
import React, { useEffect, useRef, useState } from "react";
import { ArrowRightOutlined } from "@ant-design/icons";
import DynamicSVG from "../../Common/BoxDesignCompontent/svg";
@@ -65,6 +65,8 @@ const Typesetting = props => {
const [newDHorizontalType, setNewDHorizontalType] = useState(0);
const [newDPortraitType, setNewDPortraitType] = useState(0);
const [oldVariables, setOldVariables] = useState("");
+ const [innerWidth, setInnerWidth] = useState(0);
+ const [innerHeight, setInnerHeight] = useState(0);
// 横板
let { dHorizontal, dPortrait, dHorizontalType, dPortraitType } = slaveRowData;
// 使用 useRef 获取 DOM 元素
@@ -125,6 +127,7 @@ const Typesetting = props => {
let boxList = [];
if (sColumnNameConfig) {
const slaveNewData = slaveRowData.upAbleConfigsExtra || JSON.parse(slaveRowData.sColumnNameConfig);
+ // 处理为双盒的部件
const tables = [
{ name: "盒型类别", value: slaveRowData.sBoxType, type: null },
{ name: "盒身", value: slaveRowData.sBoxBody, type: slaveRowData.sTypes },
@@ -143,22 +146,6 @@ const Typesetting = props => {
{ name: "右贴边位", value: "dYTBW" },
{ name: "右(下)插位组件", value: "dYXCW" },
];
- const doubleTitlieList1 = [
- { name: "左上插位组件", value: "dZSCW" },
- { name: "上插位组件", value: "dSCW" },
- { name: "右上插位组件", value: "dYSCW" },
- { name: "左偏移", value: "dZPY" },
- { name: "左插位组件", value: "dZCW" },
- { name: "左下插位组件", value: "dZXCW" },
- { name: "右偏移", value: "dYPY" },
- { name: "右插位组件", value: "dYCW" },
- { name: "右下插位组件", value: "dYXCW" },
- { name: "首盒长", value: "dSHC" },
- { name: "首盒宽", value: "dSHK" },
- { name: "次盒长", value: "dCHC" },
- { name: "次盒宽", value: "dCHK" },
- ];
- const srcList = Number(slaveRowData.sTypes) === 8 ? doubleTitlieList1 : titleList1;
slaveNewData.forEach(x => {
let key = 0;
if (x.sAssignFormula) {
@@ -168,7 +155,7 @@ const Typesetting = props => {
}
boxList.push({
value: key,
- sName: srcList.find(item => item.value === x.sName)?.name || "",
+ sName: titleList1.find(item => item.value === x.sName)?.name || "",
isEditable: true,
isSelect: false,
selectValue: null,
@@ -176,8 +163,20 @@ const Typesetting = props => {
selectImage: null,
type: x.sTypes || null,
show: true,
- sCode: srcList.find(item => item.value === x.sName)?.value || "",
+ sCode: titleList1.find(item => item.value === x.sName)?.value || "",
showName: x.showName, // 参数名称
+ sLength: x.iSLength,
+ sWidth: x.iSWidth,
+ sType: x.iSType,
+ sTypeName: Number(x.iSType) === 0 ? "矩形" : "梯形",
+ sOffset: x.sSOffset,
+ sQuantity: x.iSQuantity,
+ cLength: x.iCLength,
+ cWidth: x.iCWidth,
+ cType: x.iCType,
+ cTypeName: Number(x.iCType) === 0 ? "矩形" : "梯形",
+ cOffset: x.sCOffset,
+ cQuantity: x.iCQuantity,
});
});
tables.forEach(x => {
@@ -209,9 +208,121 @@ const Typesetting = props => {
}
});
let DisableMateriallIcon = L ? sPackDetailPath : null;
+ function calculateCupUnfoldDimensions(D, d, h) {
+
+ const R1 = D / 2; // 上口半径
+ const R2 = d / 2; // 底部半径
+ if (D === d) {
+ const paperCup = commonFunc.showLocalMessage(props, "paperCup", "L不能小于等于W!");
+ message.error(paperCup);
+ return {
+ width: 0,
+ height: 0
+ }
+ }
+ // 1. 计算母线长 l
+ const deltaR = R1 - R2;
+ const l = Math.sqrt(deltaR * deltaR + h * h);
+
+ // 2. 计算外半径 R 和内半径 r
+ const R = (R1 * l) / deltaR; // 外半径
+ const r = R - l; // 内半径
+
+ // 3. 计算圆心角 θ(弧度)
+ const theta_rad = (2 * Math.PI * R1) / R;
+ const halfTheta = theta_rad / 2;
+
+ // 4. 计算弦长(水平宽度)
+ const chord = 2 * R * Math.sin(halfTheta);
+
+ // 5. 展开图垂直高度
+ const y_top = -R; // 外弧中点(最高点)
+ const y_inner_end = -r * Math.cos(halfTheta);
+ const verticalHeight = y_inner_end - y_top;
+
+ // ✅ 新增:计算关键点坐标(以圆心为原点,y 向上为正)
+ // 注意:数学坐标系中,角度从 x 轴开始逆时针,但我们希望顶部在 y 轴负方向
+ // 所以我们把角度偏移 -90°(即 -π/2),让 0° 指向正上方
+
+ const angleOffset = -Math.PI / 2; // 使 0° 指向顶部
+
+ const points = {
+ outerCenter: {
+ x: R * Math.cos(halfTheta + angleOffset),
+ y: R * Math.sin(halfTheta + angleOffset)
+ },
+ outerLeft: {
+ x: R * Math.cos(-halfTheta + angleOffset),
+ y: R * Math.sin(-halfTheta + angleOffset)
+ },
+ outerRight: {
+ x: R * Math.cos(halfTheta + angleOffset),
+ y: R * Math.sin(halfTheta + angleOffset)
+ },
+ innerLeft: {
+ x: r * Math.cos(-halfTheta + angleOffset),
+ y: r * Math.sin(-halfTheta + angleOffset)
+ },
+ innerRight: {
+ x: r * Math.cos(halfTheta + angleOffset),
+ y: r * Math.sin(halfTheta + angleOffset)
+ },
+ // 也可以计算顶部中点(0° 方向)
+ topCenter: {
+ x: 0,
+ y: -R // 正上方
+ },
+ bottomLeft: {
+ x: -chord / 2,
+ y: -r * Math.cos(halfTheta)
+ },
+ bottomRight: {
+ x: chord / 2,
+ y: -r * Math.cos(halfTheta)
+ }
+ };
+
+ // 如果你需要用于 SVG(y 向下为正),可以转换
+ const pointsForSVG = Object.keys(points).reduce((acc, key) => {
+ acc[key] = {
+ x: points[key].x,
+ y: -points[key].y // 反转 y 轴
+ };
+ return acc;
+ }, {});
+
+ return {
+ width: chord,
+ height: verticalHeight,
+ R, r, l,
+ theta_deg: (theta_rad * 180) / Math.PI,
+ points, // 数学坐标系(y 向上)
+ pointsForSVG, // SVG 坐标系(y 向下)
+ chord,
+ verticalHeight
+ };
+ }
// 盒子展长展开公式计算
- const innerWidth = slaveRowData.sTypes === "6" ? evaluateFormula(sWidthFormula, variabless) : evaluateFormula(sLengthFormula, variabless);
- const innerHeight = slaveRowData.sTypes === "6" ? evaluateFormula(sLengthFormula, variabless) : evaluateFormula(sWidthFormula, variabless);
+ // 在 useEffect 内部
+ useEffect(() => {
+ if (Number(slaveRowData.sTypes) === 9) {
+ if (L > 0 && W > 0 && H > 0) {
+ const { width, height } = calculateCupUnfoldDimensions(L, W, D);
+ // 确保新值与旧值不同时才更新
+ if (width && height) {
+ setInnerWidth(Number(width.toFixed(2)));
+ setInnerHeight(Number(height.toFixed(2)));
+ }
+ }
+ } else {
+ // 计算其他类型的盒子尺寸
+ let newWidth = slaveRowData.sTypes === "6" ? evaluateFormula(sWidthFormula, variabless) : evaluateFormula(sLengthFormula, variabless);
+ let newHeight = slaveRowData.sTypes === "6" ? evaluateFormula(sLengthFormula, variabless) : evaluateFormula(sWidthFormula, variabless);
+ setInnerWidth(newWidth);
+ setInnerHeight(newHeight);
+ }
+ }, [slaveRowData.sTypes, L, W, H, D, sLengthFormula, sWidthFormula, variabless]);
+
const { sSettingMethod, sSGroupOffset, iFAngle, iSAngle, sSecondorizontalOffset, sSecondLongitudinalOffset } = radioValue ? radioValue : {};
const dFWidthOffset = evaluateFormula(radioValue?.sFWidthOffset, variabless); // 首盒纵向偏移
const dFLengthOffset = evaluateFormula(radioValue?.sFLengthOffset, variabless); // 首盒横向偏移
@@ -272,20 +383,11 @@ const Typesetting = props => {
// 计算剩余空间 每组都算上偏移量 那么剩余需要加上后面偏移的总量
const remainingWidth = outerWidth - colsMaxLength + (boxLengthOffset + (reference ? 0 : dSLengthOffset));
const remainingHeight = outerHeight - rowsMaxLength + (boxWidthOffset + (reference ? 0 : dSWidthOffset));
- // const remainingWidth =
- // outerWidth -
- // (cols * (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset)) - boxLengthOffset - (reference ? 0 : dSLengthOffset));
- // const remainingHeight =
- // outerHeight -
- // (rows * (innerHeightCombined + boxWidthOffset + (reference ? 0 : dSWidthOffset)) - boxWidthOffset - (reference ? 0 : dSWidthOffset));
//剩余量能不能放一下单独一个
const commonHeightCheck = remainingHeight > jInnerHeight + dXBJJ;
const commonWidthCheck = remainingWidth > jInnerWidth + dYBJJ;
const isCustomized = bAdvancedSetting;
let remaining = isVertical ? commonHeightCheck : commonWidthCheck;
- console.log(dSLengthOffset, "次盒横向偏移量");
- console.log(dSWidthOffset, "次盒纵向偏移量");
-
// 判断
// const remaining = false;
const isOdd = num => {
@@ -312,6 +414,11 @@ const Typesetting = props => {
}
}
}
+ const handleSaveState = (data) => {
+ setInnerWidth(Number(data.width.toFixed(2)))
+ setInnerHeight(Number(data.height.toFixed(2)))
+
+ }
const svgProps = {
...props,
boxList,
@@ -341,7 +448,7 @@ const Typesetting = props => {
}}
>
- {!sSvgPath ?
:

}
+ {!sSvgPath ?
:

}
{/*
*/}
@@ -381,7 +488,7 @@ const Typesetting = props => {
>
{!sSvgPath ? (
-
+
) : (

{
justifyContent: "center",
alignItems: "center",
position: "absolute",
- left: `${
- isVertical
- ? dSLengthOffset
- : iSAngle === 90 || iSAngle === 270
+ left: `${isVertical
+ ? dSLengthOffset
+ : iSAngle === 90 || iSAngle === 270
? innerHeight + dFLengthOffset + dSLengthOffset + dYBJJ
: innerWidth + dFLengthOffset + dSLengthOffset + dYBJJ
- }px`,
- top: `${
- isVertical ? jInnerHeight + dFWidthOffset + dSWidthOffset + dXBJJ : iSAngle === 90 || iSAngle === 270 ? dSWidthOffset : dSWidthOffset
- }px`,
+ }px`,
+ top: `${isVertical ? jInnerHeight + dFWidthOffset + dSWidthOffset + dXBJJ : iSAngle === 90 || iSAngle === 270 ? dSWidthOffset : dSWidthOffset
+ }px`,
}}
>
{!sSvgPath ? (
-
+
) : (

{
{/*

*/}
{/* {isSvg ?
:

} */}
- {!sSvgPath ?
:

}
+ {!sSvgPath ?
:

}
@@ -471,12 +576,12 @@ const Typesetting = props => {
const calculateLeftPosition = (col, reference, isVertical, leftPosition, dYBJJ, dSLengthOffset) => {
if (isVertical) {
if (reference) {
- return col === 0 ? leftPosition : leftPosition + dYBJJ * col;
+ return col === 0 ? leftPosition : leftPosition + (dYBJJ * col);
}
return col === 0 ? leftPosition : leftPosition + (boxLengthOffset + dYBJJ) * col;
} else {
if (reference) {
- return col === 0 ? leftPosition : leftPosition + dYBJJ * col;
+ return col === 0 ? leftPosition : leftPosition + (dYBJJ * col);
}
return col === 0 ? leftPosition : leftPosition + (boxLengthOffset + dYBJJ) * col + dSLengthOffset * col;
}
@@ -519,15 +624,15 @@ const Typesetting = props => {
if (cols === 0 || rows === 0) {
if (cols > 0) {
for (let col = 0; col < cols; col++) {
- const leftPosition = col * innerWidthCombined;
- const topPosition = 0 * innerHeightCombined;
+ const leftPosition = col * (innerWidthCombined + boxLengthOffset);
+ const topPosition = 0 * (innerHeightCombined + boxWidthOffset);
innerDivs.push(createBoxOne(col, 0, 3, leftPosition, topPosition, iFAngle, DisableMateriallIcon));
}
}
if (rows > 0) {
for (let row = 0; row < rows; row++) {
- const leftPosition = 0 * innerWidthCombined;
- const topPosition = row * innerHeightCombined;
+ const leftPosition = 0 * (innerWidthCombined + boxLengthOffset);
+ const topPosition = row * (innerHeightCombined + boxWidthOffset);
innerDivs.push(createBoxOne(0, row, 3, leftPosition, topPosition, iFAngle, DisableMateriallIcon));
}
}
@@ -535,8 +640,8 @@ const Typesetting = props => {
let hasPushed = false; // 标志变量
for (let col = 0; col < cols; col++) {
for (let row = 0; row < rows; row++) {
- const leftPosition = col * innerWidthCombined;
- const topPosition = row * innerHeightCombined;
+ const leftPosition = col * (innerWidthCombined + boxLengthOffset);
+ const topPosition = row * (innerHeightCombined + boxWidthOffset + dXBJJ);
innerDivs.push(createBox(col, row, 1, leftPosition, topPosition, iFAngle, DisableMateriallIcon));
}
// 如果可以放下首盒\
@@ -546,11 +651,11 @@ const Typesetting = props => {
if (reference) {
// 是否首盒
// 首盒的上边距下边距 末尾盒子的上下边距 添加那一行的上边距
- leftPosition = col * innerWidthCombined + dFLengthOffset;
- topPosition = rows * innerHeightCombined + dFWidthOffset;
+ leftPosition = col * (innerWidthCombined + boxLengthOffset) + dFLengthOffset;
+ topPosition = rows * (innerHeightCombined + boxWidthOffset) + dFWidthOffset;
} else {
- leftPosition = col * innerWidthCombined;
- topPosition = rows * innerHeightCombined;
+ leftPosition = col * (innerWidthCombined + boxLengthOffset);
+ topPosition = rows * (innerHeightCombined + boxWidthOffset);
}
innerDivs.push(createBoxOne(col, rows, 3, leftPosition, topPosition + dXBJJ, iFAngle, DisableMateriallIcon));
}
@@ -561,11 +666,10 @@ const Typesetting = props => {
let topPosition = 0;
let leftPosition = 0;
if (reference) {
- topPosition = index * (innerHeightCombined + boxWidthOffset);
+ topPosition = index * (innerHeightCombined + boxWidthOffset) + dFWidthOffset;
leftPosition = cols * (innerWidthCombined + boxLengthOffset);
} else {
- topPosition = index * (innerHeightCombined + boxWidthOffset + dSWidthOffset);
-
+ topPosition = index * (innerHeightCombined + boxWidthOffset + dSWidthOffset) + dFWidthOffset;
leftPosition = cols * (innerWidthCombined + boxLengthOffset + dSLengthOffset + dYBJJ);
}
innerDivs.push(createDiv(cols - 1, index, 3, leftPosition, topPosition, iFAngle, DisableMateriallIcon));
@@ -578,6 +682,7 @@ const Typesetting = props => {
onSaveDPartsLength(innerWidth, innerHeight, slaveData);
}
const propsData = innerDivs[innerDivs.length - 1];
+ const propsDataFirst = innerDivs[0];
let openEdition = 0;
if (propsData && L) {
const { dWlcd, sBillNo } = slaveRowData;
@@ -590,19 +695,20 @@ const Typesetting = props => {
const propsDataTop = Number(propsData.props.style.top.slice(0, -2));
// 判断列是否是单独的
- const newMaterialLength = parseFloat(propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined) + dZBLB + dYBLB).toFixed(2); // 原纸长
- const newMaterialWidth = parseFloat(
- propsDataTop + propsDataHeight + dSBLB + dXBLB - (isVertical ? 0 : rows >= 1 ? (remaining ? 0 : dXBJJ) : 0)
- ).toFixed(2);
-
+ let newMaterialLength = parseFloat(propsDataLeft + (remaining ? jInnerWidth : innerWidthCombined) + dZBLB + dYBLB).toFixed(2); // 原纸长
+ const newMaterialWidth = parseFloat(propsDataTop + propsDataHeight + dSBLB + dXBLB - (isVertical ? 0 : rows >= 1 ? (remaining ? 0 : dXBJJ) : 0)).toFixed(2);
+ // 如果只有一列的时候去除右边刀位
+ if (cols === 1) {
+ newMaterialLength = newMaterialLength - dYBJJ
+ }
// 计算开数
let dSinglePQty = isVertical
? remaining
? cols + cols * (rows * 2)
: cols * (rows * 2)
: remaining
- ? rows + rows * (cols * 2)
- : rows * (cols * 2);
+ ? rows + rows * (cols * 2)
+ : rows * (cols * 2);
let dHorizontalType = isVertical ? cols : remaining ? cols * 2 + 1 : cols * 2;
let dPortraitType = isVertical ? (remaining ? rows * 2 + 1 : rows * 2) : remaining ? rows : rows;
@@ -717,6 +823,8 @@ const Typesetting = props => {
const confirmParam = commonFunc.showLocalMessage(props, "confirmParam", "排版尺寸大于上机尺寸,请确认参数!");
const isJuantong = selectedNode.sTypeKey === "juantong";
+ const OpenVersion = commonFunc.showLocalMessage(props, "OpenVersion", "开版利用率");
+ const DoorWidthDirection = commonFunc.showLocalMessage(props, "DoorWidthDirections", "门幅方向");
if (isCustomized && !isShow) {
if (isMobile) return;
message.error(confirmParam);
@@ -744,6 +852,7 @@ const Typesetting = props => {
const handleCancel = () => {
setIsModalOpen(false);
};
+
return (
<>
{isShow ? (
@@ -860,7 +969,7 @@ const Typesetting = props => {
textOrientation: "upright",
}}
>
- {"门幅方向"}
+ {DoorWidthDirection}
) : (
""
@@ -953,7 +1062,7 @@ const Typesetting = props => {
{maxWidth}
{openEdition ? (
- 开版利用率:
+ {OpenVersion}:
{openEdition} %
) : null}
@@ -1232,7 +1341,7 @@ const Typesetting = props => {
textOrientation: "upright",
}}
>
- {"门幅方向"}
+ {DoorWidthDirection}
) : (
""
@@ -1329,7 +1438,7 @@ const Typesetting = props => {
{maxWidth}
{openEdition ? (
- 开版利用率:
+ {OpenVersion}:
{openEdition} %
) : null}
@@ -1463,6 +1572,8 @@ const Typesetting = props => {
+
+
>
);
};
diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx
index 8304a32..900f79b 100644
--- a/src/components/QuickQuote/index.jsx
+++ b/src/components/QuickQuote/index.jsx
@@ -2452,6 +2452,7 @@ const BoxComponent = props => {
let boxList = [];
const { sStripType = 0 } = selectedNode;
+
if (
(slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth && masterData.dHeight) ||
(Number(sStripType) === 1 && slaveRowData.sColumnNameConfig && masterData.dLength && masterData.dWidth) ||
@@ -2598,12 +2599,16 @@ const BoxComponent = props => {
}
const getImageUrl = (sName) => {
const imageUrlNew = `${commonConfig.server_host}file/downloadPrice?sLogoName=${sName}&date=${new Date().getTime()}`;
- return imageUrlNew
- }
- let imagesData = [
- { src: getImageUrl(removeExtension(slaveRowData.sPackDetailPathUpLoad)), alt: "展开图" },
- { src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" },
- ];
+ return imageUrlNew;
+ };
+
+ let imagesData = useMemo(() => {
+ if (!slaveRowData) return [];
+ return [
+ { src: getImageUrl(removeExtension(slaveRowData.sPackDetailPathUpLoad)), alt: "展开图" },
+ { src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" },
+ ];
+ }, [slaveRowData?.sPackDetailPathUpLoad, slaveRowData?.sPackPath]);
if (!slaveRowData.sPackDetailPathUpLoad) {
imagesData = [{ src: getImageUrl(removeExtension(slaveRowData.sPackPath)), alt: "立体图" }];
} else if (!slaveRowData.sPackPath) {
@@ -2713,6 +2718,7 @@ const BoxComponent = props => {
transform: " translate(-50%, -50%)",
width: "100%",
height: "200px",
+ margin:0
}}
>