Bladeren bron

报价单客户

zhaoxiaohai 3 jaren geleden
bovenliggende
commit
1fc8bd1e4e

+ 54 - 0
packageA/offers/modules/setclient/index.js

@@ -0,0 +1,54 @@
+const _Http = getApp().globalData.http;
+Component({
+    properties: {
+
+    },
+    data: {
+        content: {
+            total: null
+        }
+    },
+    methods: {
+        getList(id) {
+            _Http.basic({
+                "id": 20221012164302,
+                "content": {
+                    sa_customersid: id
+                },
+            }).then(res => {
+                console.log("报价单关联客户", res)
+                if (res.msg != '成功') return wx.showToast({
+                    title: res.msg,
+                    icon: "none"
+                });
+                this.setData({
+                    list: [res.data],
+                    "content.total": 1
+                })
+                this.getTags();
+            })
+        },
+        /* 获取列表标签 */
+        getTags() {
+            let item = this.data.list[0];
+            _Http.basic({
+                "id": 20220929085401,
+                "content": {
+                    nocache: true,
+                    "ownertable": "sa_customers",
+                    ownerid: item.sa_customersid
+                }
+            }).then(res => {
+                console.log("标签", res)
+                if (res.msg != '成功') return wx.showToast({
+                    title: res.msg,
+                    icon: "none"
+                });
+                item.tags = res.data
+                this.setData({
+                    "list[0]": item
+                })
+            })
+        },
+    }
+})

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

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

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

@@ -0,0 +1 @@
+/* packageA/offers/modules/project/index.wxss */

+ 1 - 0
packageA/offers/modules/setclient/index.wxml

@@ -0,0 +1 @@
+<List list='{{list}}' />