xiaohaizhao пре 1 година
родитељ
комит
95ca0195b4
3 измењених фајлова са 26 додато и 14 уклоњено
  1. 1 1
      components/organization/index.js
  2. 23 12
      packageA/receivables/index.js
  3. 2 1
      packageA/receivables/index.wxml

+ 1 - 1
components/organization/index.js

@@ -91,7 +91,7 @@ Component({
                         }
                         this.setData({
                             users: {
-                                label: "员",
+                                label: "业务员",
                                 list: res.data.hr,
                                 copyList: res.data.hr,
                                 active

+ 23 - 12
packageA/receivables/index.js

@@ -75,27 +75,38 @@ Page({
       "id": 20240320111604,
       content
     }).then(res => {
+      if (res.msg != '成功') return wx.showToast({
+        title: res.msg,
+        icon: "none"
+      })
       this.setListHeight()
       this.selectComponent('#ListBox').RefreshToComplete();
       console.log("应收账款列表", res)
+      let showList = [],
+        obj = {
+          "sumallaoverduemount": '总应收',
+          "sumonemonthamount": '逾期1月',
+          "sumthreemonthamount": '逾期1-3月',
+          "sumupthreemonthamount": '逾期三月以上'
+        }
       if (res.data.length) {
-        let showList = [],
-          obj = {
-            "sumallaoverduemount": '总应收',
-            "sumonemonthamount": '逾期1月',
-            "sumthreemonthamount": '逾期1-3月',
-            "sumupthreemonthamount": '逾期三月以上'
-          }
         for (const key in obj) {
           showList.push({
             name: obj[key] + '(元)',
             value: CNY(res.data[0][key])
           })
         }
-        this.setData({
-          showList
-        })
-      };
+      } else {
+        for (const key in obj) {
+          showList.push({
+            name: obj[key] + '(元)',
+            value: CNY(0)
+          })
+        }
+      }
+      this.setData({
+        showList
+      })
       let list = res.data.map(v => {
         v.allaoverduemount = CNY(v.allaoverduemount)
         v.onemonthamount = CNY(v.onemonthamount)
@@ -146,7 +157,7 @@ Page({
     this.getList(true)
   },
   pointChange(e) {
-    this.data.content.querytype = this.data.points[e.detail.value]
+    this.data.content.point = this.data.points[e.detail.value]
     this.getList(true)
   },
   onReady() {

+ 2 - 1
packageA/receivables/index.wxml

@@ -33,6 +33,7 @@
 		<view class="value line-1">{{item.value}}</view>
 	</view>
 </view>
+
 <view class="table">
 	<view class="roof" />
 	<Yl_ListBox id='ListBox' scrollX='{{true}}' bind:getlist='getList'>
@@ -50,6 +51,6 @@
 	</Yl_ListBox>
 </view>
 
-<Yl_Filtrate show='{{showFiltrate}}' isReset='{{false}}' list="{{[]}}" bindhandle="handleFilter">
+<Yl_Filtrate show='{{showFiltrate}}' list="{{[]}}" bindhandle="handleFilter">
 	<organization slot='head' defaultMy id='organization' />
 </Yl_Filtrate>