Commit 7e6a348a048b5386e2d3b056ef383e31f68bf8f9

Authored by Min
1 parent 92a0d63a

1.处理工艺卡,工单单据复制到报错

src/components/Common/CommonBillEvent.js
@@ -2792,7 +2792,7 @@ export default (ChildComponent) => { @@ -2792,7 +2792,7 @@ export default (ChildComponent) => {
2792 if (dataReturn.code === 1) { 2792 if (dataReturn.code === 1) {
2793 // eslint-disable-next-line no-underscore-dangle 2793 // eslint-disable-next-line no-underscore-dangle
2794 const _this = this; // 解决confirm中this指向问题; 2794 const _this = this; // 解决confirm中this指向问题;
2795 - if (dataReturn.dataset.rows.length > 0) { 2795 + if (dataReturn?.dataset?.rows?.length > 0) {
2796 confirm({ 2796 confirm({
2797 title: commonFunc.showMessage(app.commonConst, 'beUsedToNew'), /* 单据已存在,是否填写新单据 */ 2797 title: commonFunc.showMessage(app.commonConst, 'beUsedToNew'), /* 单据已存在,是否填写新单据 */
2798 onOk() { 2798 onOk() {
src/components/Manufacture/ProcessCardPackTableTreeNew/index.js
@@ -1048,7 +1048,7 @@ const ProcessCardPackTableTreeNewEvent = props => { @@ -1048,7 +1048,7 @@ const ProcessCardPackTableTreeNewEvent = props => {
1048 const values = { sSlaveId: sId }; 1048 const values = { sSlaveId: sId };
1049 const dataReturn = (await commonServices.postValueService(token, values, dataUrl)).data; 1049 const dataReturn = (await commonServices.postValueService(token, values, dataUrl)).data;
1050 if (dataReturn.code === 1) { 1050 if (dataReturn.code === 1) {
1051 - if (dataReturn.dataset.rows.length > 0) { 1051 + if (dataReturn?.dataset?.rows?.length > 0) {
1052 Modal.confirm({ 1052 Modal.confirm({
1053 title: commonFunc.showMessage(app.commonConst, "beUsedToNew") /* 单据已存在,是否填写新单据 */, 1053 title: commonFunc.showMessage(app.commonConst, "beUsedToNew") /* 单据已存在,是否填写新单据 */,
1054 onOk() { 1054 onOk() {
src/components/Manufacture/WorkOrderPackTableTreeNew/index.js
@@ -1679,7 +1679,7 @@ const WorkOrderPackTableTreeNewEvent = props => { @@ -1679,7 +1679,7 @@ const WorkOrderPackTableTreeNewEvent = props => {
1679 const values = { sSlaveId: sId }; 1679 const values = { sSlaveId: sId };
1680 const dataReturn = (await commonServices.postValueService(token, values, dataUrl)).data; 1680 const dataReturn = (await commonServices.postValueService(token, values, dataUrl)).data;
1681 if (dataReturn.code === 1) { 1681 if (dataReturn.code === 1) {
1682 - if (dataReturn.dataset.rows.length > 0) { 1682 + if (dataReturn?.dataset?.rows?.length > 0) {
1683 Modal.confirm({ 1683 Modal.confirm({
1684 title: commonFunc.showMessage(app.commonConst, "beUsedToNew") /* 单据已存在,是否填写新单据 */, 1684 title: commonFunc.showMessage(app.commonConst, "beUsedToNew") /* 单据已存在,是否填写新单据 */,
1685 onOk() { 1685 onOk() {
src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
@@ -2842,7 +2842,7 @@ class QuotationPackTableTree extends Component { @@ -2842,7 +2842,7 @@ class QuotationPackTableTree extends Component {
2842 if (dataReturn.code === 1) { 2842 if (dataReturn.code === 1) {
2843 // eslint-disable-next-line no-underscore-dangle 2843 // eslint-disable-next-line no-underscore-dangle
2844 const _this = this; // 解决confirm中this指向问题; 2844 const _this = this; // 解决confirm中this指向问题;
2845 - if (dataReturn.dataset.rows.length > 0) { 2845 + if (dataReturn?.dataset?.rows?.length > 0) {
2846 confirm({ 2846 confirm({
2847 title: commonFunc.showMessage(app.commonConst, 'beUsedToNew'), /* 单据已存在,是否填写新单据 */ 2847 title: commonFunc.showMessage(app.commonConst, 'beUsedToNew'), /* 单据已存在,是否填写新单据 */
2848 onOk() { 2848 onOk() {