فهرست منبع

添加数据更新列表

xiaohaizhao 2 سال پیش
والد
کامیت
19fb508393

+ 4 - 3
packageA/invoiceforecast/modules/client/index.js

@@ -104,6 +104,7 @@ Component({
                             title: res.msg == '成功' ? '添加成功' : res.msg,
                             icon: "none"
                         });
+                        getCurrentPages()[getCurrentPages().length - 2].getDetail();
                         if (res.msg == '成功') {
                             that.getList(that.data.sa_salesforecastbillid, true)
                             setTimeout(() => {
@@ -172,9 +173,9 @@ Component({
                         list: res.data
                     })
                 }
-                if (res.data.length) this.setData({
-                    allinvoiceamount: CNY(res.data[0].allinvoiceamount),
-                    alloutamount: CNY(res.data[0].alloutamount),
+                this.setData({
+                    allinvoiceamount: res.data.length ? CNY(res.data[0].allinvoiceamount) : "¥0.00",
+                    alloutamount: res.data.length ? CNY(res.data[0].alloutamount) : "¥0.00"
                 })
             })
             getCurrentPages()[getCurrentPages().length - 1].getDetail();

+ 1 - 0
packageA/invoiceforecast/modules/orderForm/index.js

@@ -111,6 +111,7 @@ Component({
                             title: res.msg == '成功' ? '添加成功' : res.msg,
                             icon: "none"
                         });
+                        getCurrentPages()[getCurrentPages().length - 2].getDetail();
                         if (res.msg == '成功') {
                             that.getList(that.data.sa_salesforecastbillid, true)
                             setTimeout(() => {

+ 4 - 3
packageA/invoiceforecast/modules/project/index.js

@@ -108,6 +108,7 @@ Component({
                             title: res.msg == '成功' ? '添加成功' : res.msg,
                             icon: "none"
                         });
+                        getCurrentPages()[getCurrentPages().length - 2].getDetail();
                         if (res.msg == '成功') {
                             that.getList(that.data.sa_salesforecastbillid, true)
                             setTimeout(() => {
@@ -177,9 +178,9 @@ Component({
                         list: res.data
                     })
                 }
-                if (res.data.length) this.setData({
-                    allinvoiceamount: CNY(res.data[0].allinvoiceamount),
-                    alloutamount: CNY(res.data[0].alloutamount),
+                this.setData({
+                    allinvoiceamount: res.data.length ? CNY(res.data[0].allinvoiceamount) : "¥0.00",
+                    alloutamount: res.data.length ? CNY(res.data[0].alloutamount) : "¥0.00"
                 })
             })
             getCurrentPages()[getCurrentPages().length - 1].getDetail();