xiaohaizhao 2 years ago
parent
commit
209e643278

+ 8 - 3
app.json

@@ -15,7 +15,8 @@
     "pages/tabbar/mine/address/index",
     "pages/tabbar/mine/address/update"
   ],
-  "subpackages": [{
+  "subpackages": [
+    {
       "root": "packageA",
       "pages": [
         "options/index",
@@ -44,7 +45,10 @@
         "returnOne/index",
         "returnOne/detail",
         "returnOne/update",
-        "market/selected/index"
+        "market/selected/index",
+        "dispatchBill/index",
+        "dispatchBill/detail",
+        "activity/selectProduct/index"
       ]
     },
     {
@@ -112,7 +116,8 @@
     "color": "#000000",
     "selectedColor": "#000000",
     "backgroundColor": "#000000",
-    "list": [{
+    "list": [
+      {
         "pagePath": "pages/tabbar/home/index"
       },
       {

+ 10 - 14
packageA/market/detail.js

@@ -25,10 +25,10 @@ Page({
     this.setData({
       userrole: wx.getStorageSync('userrole')
     })
-    this.getDetail();
+    this.getDetail(true);
   },
   /* 获取详情 */
-  getDetail() {
+  getDetail(init = false) {
     let content = this.data.content;
     if (sys_enterpriseid) content.sys_enterpriseid = sys_enterpriseid;
     _Http.basic({
@@ -40,17 +40,11 @@ Page({
         title: res.msg,
         icon: "none"
       })
-      if (res.data.item.length == 0) {
-        wx.showToast({
-          title: '未查询到商品',
-          icon: "none",
-          mask: true
-        })
-        setTimeout(() => {
-          wx.navigateBack();
-        }, 500)
-        return;
-      }
+      if (res.data.item.length == 0) return wx.showToast({
+        title: '未查询到商品',
+        icon: "none",
+        mask: true
+      })
       this.handleFiles(res.data.item[0].attinfos)
       const CNY = sum => currency(sum, {
         symbol: "¥",
@@ -61,11 +55,13 @@ Page({
       this.setData({
         detail: res.data.item[0],
         content: Object.assign(this.data.content, res.data.rows[0]),
+        loading: false
+      });
+      if (init) this.setData({
         specRows: res.data.specRows,
         cheekRows: res.data.cheekRows,
         materialRows: res.data.materialRows,
         colorRows: res.data.colorRows,
-        loading: false
       })
     })
   },

+ 2 - 1
packageA/orderForm/modules/product/index.js

@@ -187,8 +187,9 @@ Component({
                     id = 20221109153502;
                     break;
             }
+
             wx.navigateTo({
-                url: `/select/product/index?params=${JSON.stringify({
+                url: `${detail.type=='促销订单'?'/packageA/activity/selectProduct/index':'/select/product/index'}?params=${JSON.stringify({
 					"id":id,
 					"content": {
 						nocache:true,

+ 4 - 4
packageA/shopping/modules/standard/index.wxml

@@ -12,10 +12,10 @@
                 <text class="iconfont icon-guanlian-shanchu" catchtap="deteleItem" data-item="{{item}}" />
             </view>
             <view class="exp">编号:{{item.itemno}}</view>
-            <view class="exp">规格:{{item.spec}}</view>
-            <view class="exp">型号:{{item.model}}</view>
-            <view class="exp">品牌:{{item.brandname}}</view>
-            <view class="exp">领域:{{item.tradefield_shoppingcart}}</view>
+            <view class="exp">规格:{{item.spec ||" --"}}</view>
+            <view class="exp">型号:{{item.model ||" --"}}</view>
+            <view class="exp">品牌:{{item.brandname ||" --"}}</view>
+            <view class="exp">领域:{{item.tradefield_shoppingcart ||" --"}}</view>
             <view class="exp"><text style="font-size: 24rpx;font-weight: 600;color: #FF3B30;">{{item.showPrice}}</text></view><!-- /<text style="font-size: 20rpx;">¥{{item.oldprice}}</text> -->
         </view>
     </view>