xiaohaizhao 4 miesięcy temu
rodzic
commit
0c85d5f386

+ 44 - 21
packageA/fittings/modules/product/index.js

@@ -246,7 +246,6 @@ Component({
                 })
                 getApp().globalData.handleSelect = this.handleSelect.bind(this);
             } else if (e.detail.name == '绑定保修卡信息添加') {
-                //2025121119452803
                 wx.navigateTo({
                     url: `/select/addPreciseSearch/index?params=${JSON.stringify({
                         "id": 2025121119452803 || 2025080510465203,
@@ -257,31 +256,55 @@ Component({
                 this.setData({
                     type: detail.type
                 })
+                let tableid = 985;
+                try {
+                    tableid = wx.getStorageSync('auth').wAccessoriesApplication.tables.swcard.tableid;
+                } catch (error) {
+                    console.error(error)
+                }
+                let loading1 = false;
                 getApp().globalData.handleSelectCardno = function ({
                     item
                 }) {
-                    this.setData({
-                        cardno: item.cardno
-                    })
-                    _Http.cardno = item
-                    wx.redirectTo({
-                        url: `/select/product/index?params=${JSON.stringify({
-                            "id": id,
-                            "content": {
-                                nocache: true,
-                                sa_orderid, //订单ID
-                                "total": 0,
-                                "where": {
-                                    "condition": ""
-                                }
+                    if (loading1) return;
+                    loading1 = true;
+                    _Http.basic({
+                        "id": 2025080510465203,
+                        "content": {
+                            tableid,
+                            "sys_enterpriseid": detail.sys_enterpriseid,
+                            "where": {
+                                "sku": item.sku,
+                                "cardno": "",
+                                "name": "",
+                                "phonenumber": ""
                             }
-                        })}&butText=添加产品`
-                    });
-                    this.setData({
-                        type: detail.type
+                        }
+                    }).then(res => {
+                        loading1 = false;
+                        console.log(":2332", res)
+                        this.setData({
+                            cardno: item.cardno
+                        })
+                        _Http.cardno = (res.code == 1 && res.data.total != 0) ? res.data[0] : item
+                        wx.redirectTo({
+                            url: `/select/product/index?params=${JSON.stringify({
+                                "id": id,
+                                "content": {
+                                    nocache: true,
+                                    sa_orderid, //订单ID
+                                    "total": 0,
+                                    "where": {
+                                        "condition": ""
+                                    }
+                                }
+                            })}&butText=添加产品`
+                        });
+                        this.setData({
+                            type: detail.type
+                        })
+                        getApp().globalData.handleSelect = this.handleSelect.bind(this);
                     })
-                    getApp().globalData.handleSelect = this.handleSelect.bind(this);
-
                 }.bind(this);
             } else {
                 wx.navigateTo({

+ 9 - 2
project.private.config.json

@@ -24,12 +24,19 @@
   "condition": {
     "miniprogram": {
       "list": [
+        {
+          "name": "packageA/orderForm/detail",
+          "pathName": "packageA/orderForm/detail",
+          "query": "id=2082889",
+          "scene": null,
+          "launchMode": "default"
+        },
         {
           "name": "/packageA/repair/index",
           "pathName": "/packageA/repair/detail",
           "query": "id=272515",
-          "scene": null,
-          "launchMode": "default"
+          "launchMode": "default",
+          "scene": null
         },
         {
           "name": "packageA/orderForm/detail",

+ 2 - 0
select/product/index.js

@@ -45,12 +45,14 @@ Page({
 		};
 		if (_Http.cardno) {
 			let cardno = _Http.cardno;
+			console.log("cardno",cardno)
 			this.setData({
 				params: {
 					"id": 2025080511204503,
 					"content": {
 						"itemid": cardno.itemid,
 						"sa_orderid": _Http.sa_orderid,
+						skucreatedate: cardno.skucreatedate || '',
 						tableid,
 						pageNumber: 1,
 						pageTotal: 1,