Commit 57135eb88fb213f1b6567f0e9993dc4908150a09

Authored by Min
1 parent 732ceda8

1.CommobilePadBill 处理删除单据后报错问题

src/components/Common/CommonNewBillEvent.js
@@ -1667,7 +1667,7 @@ export default ChildComponent => { @@ -1667,7 +1667,7 @@ export default ChildComponent => {
1667 // item.column?.forEach(col=>{ 1667 // item.column?.forEach(col=>{
1668 // if(col.isSettingFunctions) { 1668 // if(col.isSettingFunctions) {
1669 // if(col.iOrder > 10 ) { 1669 // if(col.iOrder > 10 ) {
1670 - // const i = Math.floor(col.iOrder / 10) 1670 + // const i = Math.floor(col.iOrder / 10)
1671 // col.iOrder = this.props.slaveData[i - 1].iOrder 1671 // col.iOrder = this.props.slaveData[i - 1].iOrder
1672 // } else { 1672 // } else {
1673 // col.iOrder = 1; 1673 // col.iOrder = 1;
@@ -1702,7 +1702,7 @@ export default ChildComponent => { @@ -1702,7 +1702,7 @@ export default ChildComponent => {
1702 } 1702 }
1703 } 1703 }
1704 }) 1704 })
1705 - 1705 +
1706 const returnData = await commonBusiness.saveData({ token, value: params, sModelsId }); 1706 const returnData = await commonBusiness.saveData({ token, value: params, sModelsId });
1707 if (commonUtils.isNotEmptyObject(returnData)) { 1707 if (commonUtils.isNotEmptyObject(returnData)) {
1708 if (commonUtils.isNotEmptyObject(copyTo)) { 1708 if (commonUtils.isNotEmptyObject(copyTo)) {
@@ -2489,7 +2489,11 @@ export default ChildComponent => { @@ -2489,7 +2489,11 @@ export default ChildComponent => {
2489 if (this.props.app.currentPane.refresh !== undefined) { 2489 if (this.props.app.currentPane.refresh !== undefined) {
2490 this.props.app.currentPane.refresh(); 2490 this.props.app.currentPane.refresh();
2491 } 2491 }
2492 - this.handleDelDataSuccess(props); 2492 + if(location.pathname.includes(('commobilePadBill'))){
  2493 + this.handleDelDataSuccessPad(props);
  2494 + } else {
  2495 + this.handleDelDataSuccess(props);
  2496 + }
2493 } else { 2497 } else {
2494 /* 失败 */ 2498 /* 失败 */
2495 this.props.getServiceError(data); 2499 this.props.getServiceError(data);
@@ -2498,6 +2502,13 @@ export default ChildComponent => { @@ -2498,6 +2502,13 @@ export default ChildComponent => {
2498 2502
2499 /* 数据删除成功跳转到新路由即pane */ 2503 /* 数据删除成功跳转到新路由即pane */
2500 handleDelDataSuccess = props => { 2504 handleDelDataSuccess = props => {
  2505 + if(location.pathname.includes(('commobilePadBill'))){
  2506 + window.history.back(-1);
  2507 + setTimeout(() => {
  2508 + this.props.dispatch({ type: "app/refreshPage" });
  2509 + }, 100);
  2510 + return;
  2511 + }
2501 const { app } = props; 2512 const { app } = props;
2502 let { panes, currentPane } = app; 2513 let { panes, currentPane } = app;
2503 /* 删除单据后退出当前路由后,标签panes变化后的集合 */ 2514 /* 删除单据后退出当前路由后,标签panes变化后的集合 */
@@ -2507,6 +2518,14 @@ export default ChildComponent => { @@ -2507,6 +2518,14 @@ export default ChildComponent => {
2507 this.props.onRemovePane(panes, currentPane); 2518 this.props.onRemovePane(panes, currentPane);
2508 }; 2519 };
2509 2520
  2521 + handleDelDataSuccessPad = props => {
  2522 + window.history.back(-1);
  2523 + setTimeout(() => {
  2524 + this.props.dispatch({ type: "app/refreshPage" });
  2525 + // history.push(location.pathname);
  2526 + }, 100);
  2527 + };
  2528 +
2510 /** 添加表格空行 */ 2529 /** 添加表格空行 */
2511 handleTableAdd = (name, isWait) => { 2530 handleTableAdd = (name, isWait) => {
2512 /* 从CommonBase获取默认参数 */ 2531 /* 从CommonBase获取默认参数 */