Browse Source

项目关联报价单

zhaoxiaohai 3 years ago
parent
commit
259af10bc3

+ 50 - 0
packageA/project/modules/offers/index.js

@@ -0,0 +1,50 @@
+const _Http = getApp().globalData.http;
+Component({
+    properties: {},
+    data: {
+        list: [],
+        sa_projectid: "",
+        "content": {
+            "version": 1,
+            "nocache": true,
+            "pageNumber": 1,
+            "pageTotal": 1,
+            "total": null,
+            "type": 1,
+            "where": {
+                "condition": ""
+            }
+        }
+    },
+    methods: {
+        getList(id, init) {
+            let content = this.data.content;
+            content.sa_projectid = id;
+            if (init) content.pageNumber = 1
+            _Http.basic({
+                "id": 20221124190702,
+                content
+            }).then(res => {
+                console.log("报价单", res)
+                if (res.msg != '成功') return wx.showToast({
+                    title: res.data,
+                    icon: "none"
+                })
+                this.setData({
+                    list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+                    "content.pageNumber": res.pageNumber + 1,
+                    "content.pageSize": res.pageSize,
+                    "content.pageTotal": res.pageTotal,
+                    "content.total": res.total,
+                    sa_projectid: id
+                });
+            })
+        },
+        /* 修改总数 */
+        changeTotal() {
+            this.setData({
+                "content.total": this.data.content.total - 1
+            })
+        }
+    }
+})

+ 6 - 0
packageA/project/modules/offers/index.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+        "list": "/packageA/offers/modules/list/index"
+    }
+}

+ 1 - 0
packageA/project/modules/offers/index.scss

@@ -0,0 +1 @@
+@import "../../../setclient/modules/address/head.scss";

+ 16 - 0
packageA/project/modules/offers/index.wxml

@@ -0,0 +1,16 @@
+<view class="head">
+    <view class="count">
+        总共{{content.total}}个
+    </view>
+    <view class="expand">
+        <!-- <navigator url="#" class="but" bindtap="toSearch">
+            <van-icon name="search" />
+        </navigator>
+        <navigator url="/packageA/setclient/modules/contacts/quickly/index?sys_enterpriseid={{sys_enterpriseid}}" class="but">
+            <van-icon name="plus" />
+        </navigator> -->
+    </view>
+</view>
+<list list='{{list}}' />
+
+