Jelajahi Sumber

配件订单修改

xiaohaizhao 5 bulan lalu
induk
melakukan
6b7646f118

+ 8 - 8
packageA/fittings/modules/product/index.js

@@ -103,15 +103,14 @@ Component({
                     icon: "none"
                 })
                 res.data = res.data.map(v => {
-                    if (v.cover) {
-                        v.cover = _Http.getImageUrl(v.cover)
+                    if (v.attinfos.length != 0) {
+                        v.attinfos = file.fileList(v.attinfos)
+                        let image = v.attinfos.find(v => v.fileType == "image");
+                        v.cover = image ? _Http.getSpecifiedImage(image) : "";
                     } else {
-                        if (v.attinfos.length != 0) {
-                            v.attinfos = file.fileList(v.attinfos)
-                            let image = v.attinfos.find(v => v.fileType == "image");
-                            v.cover = image ? _Http.getSpecifiedImage(image) : "";
-                        }
+                        if (v.cover) v.cover = _Http.getImageUrl(v.cover)
                     }
+                    
                     v.deliveryIdenx = this.data.deliverys.findIndex(s => s.value == v.delivery) || 0;
                     v.showPrice = CNY(v.price)
                     v.showAmount = CNY(v.amount)
@@ -302,6 +301,7 @@ Component({
         /* 处理新增产品 */
         handleSelect(detail) {
             let that = this;
+            console.log("that.data.base", that.data.base)
             _Http.basic({
                 "id": 2024020201095102,
                 "content": {
@@ -359,7 +359,7 @@ Component({
                             v.sa_promotion_itemsid = v.sa_promotion_itemsid || 0;
                             v.custamount = v.custamount || 0;
                             v.price = this.data.type == '工具订单' ? v.marketprice : v.contractprice;
-                            v.delivery = this.data.delivery
+                            v.delivery = this.data.delivery || this.data.deliverys[0].value
                             return v
                         })
                     }

+ 1 - 1
packageA/fittings/modules/product/list/index.js

@@ -76,7 +76,7 @@ Component({
 		},
 		isEdit() {
 			if (this.data.disabled) wx.showToast({
-				title: '当前状态不可编辑!',
+				title: '当前订单状态不可编辑!',
 				icon: "none"
 			})
 		},

+ 1 - 1
packageA/orderForm/detail.wxml

@@ -64,7 +64,7 @@
 <view style="height: 20rpx;" />
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
     <Product slot='产品明细' privacyFieldC='{{privacyFieldC}}' sa_promotionid="{{detail.sa_promotionid}}" packagetypemxrows="{{detail.packagetypemxrows}}" id='Product' disabled="{{detail.status!='新建'}}" packagetype='{{detail.packagetype}}' sa_order_v='{{detail.sa_order_v}}' bind:returnProductCount='getProductCount' />
-    <Module slot='配件明细' privacyFieldC='{{privacyFieldC}}' sa_promotionid="{{detail.sa_promotionid}}" packagetypemxrows="{{detail.packagetypemxrows}}" id='Module' disabled="{{detail.status!='新建'}}" packagetype='{{detail.packagetype}}' sa_order_v='{{detail.sa_order_v}}' bind:returnProductCount='getProductCount' />
+    <Module slot='配件明细' privacyFieldC='{{privacyFieldC}}' sa_promotionid="{{detail.sa_promotionid}}" packagetypemxrows="{{detail.packagetypemxrows}}" id='Module' disabled="{{detail.status!='新建' && detail.status!='提交'}}" packagetype='{{detail.packagetype}}' sa_order_v='{{detail.sa_order_v}}' bind:returnProductCount='getProductCount' />
     <Yl_Attachment slot='附件' id='Yl_Attachment' ownertable="sa_order" ownerid="{{detail.sa_orderid}}" disabled="{{detail.status!='新建'}}" />
     <Consignment slot='出库单' id='Consignment' />
     <Shipments slot='物流单' id='Shipments' />