this.handleMobileFilterTable(e)}>
+ {
+ const searchValue = getSearchValue();
+ console.log('搜索框点击搜索', searchValue);
+ this.handleMobileFilterTable(e, false, searchValue);
+ }}>
diff --git a/src/mobile/common/CommobileSubBill.js b/src/mobile/common/CommobileSubBill.js
index 9bb7662..98068c9 100644
--- a/src/mobile/common/CommobileSubBill.js
+++ b/src/mobile/common/CommobileSubBill.js
@@ -2076,7 +2076,7 @@ class CommobileBill extends React.Component {
const dWidth = document.documentElement.clientWidth || document.body.clientWidth; /* 获取手机视窗宽度 */
- const dHeight = document.documentElement.clientHeight || document.body.clientHeight; /* 获取手机视窗宽1度 */
+ const dHeight = document.documentElement.clientHeight || document.body.clientHeight; /* 获取手机视窗宽度 */
const formItemLayout = { labelCol: { span: 2 }, wrapperCol: { span: 18 } };
const style = {
display: 'flex',
@@ -2094,7 +2094,7 @@ class CommobileBill extends React.Component {
const rowSum = (rowData, sectionID, rowID) => {
return (
- 2323232 {commonUtils.isEmptyObject(slaveConfig) ? '' : slaveConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName !== '').map((child) => {
+ {commonUtils.isEmptyObject(slaveConfig) ? '' : slaveConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName !== '').map((child) => {
const sMemo = child.sName.toLowerCase().endsWith('memo');
// sUseInfo是指被其他单据调用,或者被审核
let enabledNew = (enabled && !child.bReadonly && !child.specialControl && commonUtils.isEmpty(sUseInfo));
@@ -2472,13 +2472,13 @@ const TabComponentSlave = (props) => {
const TabComponentSlaveChild = (props) => {
const { masterConfig, masterData, slaveData: slaveDataOld, slaveChildData: slaveChildDataOld, slaveChildConfig, slaveConfig, sModelsId, enabled, app, sUseInfo } = props;
-
+
// 需要优化性能的模块ID列表(PDA慢的界面)
const performanceOptimizedModels = [
'12710101117220510358930',
];
const isPerformanceOptimized = performanceOptimizedModels.includes(sModelsId);
-
+
const slaveDataOld2 = slaveDataOld === undefined ? [] : slaveDataOld;
const slaveData = dataSource.cloneWithRows(slaveDataOld2);
diff --git a/src/mobile/common/CommobileSubBillEvent.js b/src/mobile/common/CommobileSubBillEvent.js
index c4b9e5f..2721b5b 100644
--- a/src/mobile/common/CommobileSubBillEvent.js
+++ b/src/mobile/common/CommobileSubBillEvent.js
@@ -1990,10 +1990,13 @@ export default (ChildComponent) => {
handleMobileFilterTable = (fieldConfig, tbName, record, newValue, bClear) => {
const { slaveData = [] } = this.props;
const fieldName = fieldConfig?.sName;
- const inputVal = record?.[fieldName];
- console.log('inputVal', inputVal, bClear);
+ // 优先使用传入的 newValue(搜索框传出的值),否则从 record 获取
+ const inputVal = newValue !== undefined && newValue !== '' ? newValue : record?.[fieldName];
+ console.log('搜索值:', inputVal, 'bClear:', bClear, 'newValue:', newValue);
+
+ // 清空搜索:bClear=true 或 inputVal 为空
if (bClear || !inputVal || !inputVal.trim()) {
this.props.onSaveState({ searchSlaveData: [] });
return;
--
libgit2 0.22.2