于继渤 1 سال پیش
والد
کامیت
fb474d8011
3فایلهای تغییر یافته به همراه8 افزوده شده و 8 حذف شده
  1. 5 6
      package-sales/pages/sales-outbound/add/add.js
  2. 1 1
      package-sales/pages/sales-outbound/add/add.wxml
  3. 2 1
      project.config.json

+ 5 - 6
package-sales/pages/sales-outbound/add/add.js

@@ -315,6 +315,10 @@ Page({
             if (item.skuImages) {
               item['imagesUrl'] = item.skuImages.length > 0 ? item.skuImages[0].url : null
             }
+            if (item.flgSubUnit) {
+              item.calculationFormula = item.packBox + item.unitName + '= 1' + item.subUnitName
+              item.packageBox = item['outingBox'] + item.subUnitName + item['outingPiece'] + item.unitName
+            }
             let btnFormData = JSON.parse(this.data.btnFormData)
             //销售订单、销售出库、采购退货-自动出库或者办理时要读取系统参数【欠货开单】开启就不判断库存,调取后台自动生成对应入库单
             if (btnFormData.flag && this.data.flgBackStockInvoicingSetting) {
@@ -460,12 +464,7 @@ Page({
     cardList[1].sumStandard = data.sumStandard
     cardList[1].sumQuantity = data.sumQuantity
     cardList[1].saleDiscount = data.saleDiscount
-    data.goodsList.forEach(element => {
-      if (element.flgSubUnit) {
-        element.calculationFormula = element.packBox + element.unitName + '= 1' + element.subUnitName
-        element.packageBox = element['outingBox'] + element.subUnitName + element['outingPiece'] + element.unitName
-      }
-    });
+
     this.setData({
       cardList: cardList,
       formData: JSON.stringify(data)

+ 1 - 1
package-sales/pages/sales-outbound/add/add.wxml

@@ -3,7 +3,7 @@
 <loading wx:if="{{loading}}"></loading>
 
 
-<dk-form-bill type="saleOut" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel"subCol="calculationFormula" descCol="skuName" priceCol="priceOut" quantityCol="outingQty" sumAmountCol="sumAmount" iconCol="imagesUrl" discountStandardCol="saleDiscount" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" bind:setGoods="setGoods" readonly="{{formMode == 'detail'}}" table="{{table}}" pupPriceCol="priceStd" bind:editItems="editItems" bind:openChoosedItemInfo="openChoosedItemInfo" deleteName="deleteItemList" bind:onCloseDel="deleteItemList" bind:customersChoose="customersChoose" popType="sale" priceTitle="销售价:" staff="staff" org="org" popupTopObj="{{popupTopObj}}" cardContentList="{{cardContentList}}" quantityRedTitle="可售量:" quantityRedCol="usableQty" quantityRedColFlagKey="usableQtyInsufficientFlag" goodsTagText="{{goodsTagText}}" goodsTagColor="{{goodsTagColor}}" titpsFlag="{{titpsFlag}}" titpsItemColorFlagKey="titpsItemColorFlagKey" titpsLabel="titpsLabel">
+<dk-form-bill type="saleOut" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel" subCol="calculationFormula" descCol="skuName" priceCol="priceOut" quantityCol="outingQty" sumAmountCol="sumAmount" iconCol="imagesUrl" discountStandardCol="saleDiscount" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" bind:setGoods="setGoods" readonly="{{formMode == 'detail'}}" table="{{table}}" pupPriceCol="priceStd" bind:editItems="editItems" bind:openChoosedItemInfo="openChoosedItemInfo" deleteName="deleteItemList" bind:onCloseDel="deleteItemList" bind:customersChoose="customersChoose" popType="sale" priceTitle="销售价:" staff="staff" org="org" popupTopObj="{{popupTopObj}}" cardContentList="{{cardContentList}}" quantityRedTitle="可售量:" quantityRedCol="usableQty" quantityRedColFlagKey="usableQtyInsufficientFlag" goodsTagText="{{goodsTagText}}" goodsTagColor="{{goodsTagColor}}" titpsFlag="{{titpsFlag}}" titpsItemColorFlagKey="titpsItemColorFlagKey" titpsLabel="titpsLabel">
 </dk-form-bill>
 <van-dialog id="van-dialog" />
 <view style="height: 200rpx;"></view>

+ 2 - 1
project.config.json

@@ -16,7 +16,8 @@
             "outputPath": ""
         },
         "condition": false,
-        "ignoreUploadUnusedFiles": true
+        "ignoreUploadUnusedFiles": true,
+        "minifyWXML": true
     },
     "editorSetting": {
         "tabIndent": "auto",