Просмотр исходного кода

Merge branch 'master' of http://git.dongkesoft.com:9001/iBOSS-2.0-Mini/iboss_wx_app

王英杰 1 год назад
Родитель
Сommit
f07f0627f4

+ 51 - 45
package-inventory/pages/other-warehousing/other-warehousing.js

@@ -39,30 +39,37 @@ Page({
         }],
         btnFormData: null,
         //弹出pop
-        popContent: [{
-            code: 'itemQty',
-            type: 'step',
-            title: mixins.$t('count'),
-            required: true
-        },
-        {
-            code: 'whId',
-            name: 'whName',
-            title: mixins.$t('warehouseId'),
-            type: 'drop',
-            dropType: 'warehouse'
-        },
-        {
-            code: 'skuSpec',
-            title: mixins.$t('goodSpec'),
-            type: 'str',
-            readonly: true,
-        },
-        {
-            code: 'nonStdCode',
-            title: mixins.$t('goodsBatch'),
-            type: 'str',
-        },
+        popContent: [
+            {
+                code: 'priceInto',
+                type: 'number',
+                title: mixins.$t("inboundPrice"),
+                required: true
+            },
+            {
+                code: 'itemQty',
+                type: 'step',
+                title: mixins.$t('count'),
+                required: true
+            },
+            {
+                code: 'whId',
+                name: 'whName',
+                title: mixins.$t('warehouseId'),
+                type: 'drop',
+                dropType: 'warehouse'
+            },
+            {
+                code: 'skuSpec',
+                title: mixins.$t('goodSpec'),
+                type: 'str',
+                readonly: true,
+            },
+            {
+                code: 'nonStdCode',
+                title: mixins.$t('goodsBatch'),
+                type: 'str',
+            },
         ],
         cardList: [{
             name: 'main',
@@ -146,8 +153,8 @@ Page({
         // 路由
         routeObjName: 'inboundOther',
         table: Constants.tables.inbound,
-         // 系统参数
-        flgHandleSetting: app.globalData.setting[Constants.settingCode.IVT001]   == "true" ? true : false
+        // 系统参数
+        flgHandleSetting: app.globalData.setting[Constants.settingCode.IVT001] == "true" ? true : false
 
     },
 
@@ -174,11 +181,11 @@ Page({
         }
         let contentList_ = this.data.contentList
         // 系统参数开启自动办理        
-        if (this.data.flgHandleSetting){
+        if (this.data.flgHandleSetting) {
             contentList_.splice(0, 1)
         }
-        this.setData({ 
-            contentList: contentList_, 
+        this.setData({
+            contentList: contentList_,
         })
     },
 
@@ -210,7 +217,7 @@ Page({
                 }],
             })
         }
-        sumitemquantity =   Number(data.intoingQty)
+        sumitemquantity = Number(data.intoingQty)
         sumitemAmt = Number(data.intoingQty) * Number(data.intoingAmt)
         cardList_.forEach(card => {
             if (card.name === 'items') {
@@ -225,13 +232,13 @@ Page({
                 card.itemQty = sumitemquantity
             }
         })
-        
+
         // 系统参数开启自动办理        
-        if (this.data.flgHandleSetting){ 
+        if (this.data.flgHandleSetting) {
             contentList_[0].content = sumitemAmt
-        }else{
+        } else {
             contentList_[1].content = sumitemAmt
-        } 
+        }
         // 明细的最大入库办理的量
         data.goodsList.forEach(element => {
             if (this.data.item.intoType == Constants.intoType.saleReturn) {
@@ -303,16 +310,15 @@ Page({
         let totalAmout = Number(0)
         let totalQuantity = Number(0)
         // 各个明细的金额数量
-        formData.goodsList.forEach(element => {  //循环出商品总共价格 
-            element.intoingAmt = element.pricePurchase * element.itemQty
-            element.intoingQty = element.itemQty
-            element.pricePur = element.pricePurchase
-            element.priceInto = element.pricePurchase
+        formData.goodsList.forEach(element => {  //循环出商品总共价格             
+            element.intoingQty = element.itemQty 
+            element.priceInto = element.priceInto?element.priceInto : element.pricePurchase
+            element.intoingAmt = element.priceInto * element.itemQty
             element.intoAmt = 0     //  已入库金额
             element.intoQty = 0     //  已入库数量
-            totalAmout += Number(element.pricePurchase * element.itemQty)
-            totalQuantity += Number( element.itemQty)
-            element.nonStdCode = element.nonStdCode!=null?element.nonStdCode:'-'
+            totalAmout += Number(element.priceInto * element.itemQty)
+            totalQuantity += Number(element.itemQty)
+            element.nonStdCode = element.nonStdCode != null ? element.nonStdCode : '-'
         })
         // 左下角的合计金额
         contentList_.forEach(card => {
@@ -380,11 +386,11 @@ Page({
         params.intoingQty = formData.goodsList.sum("intoingQty")     //一共的商品数量
         params.intoAmt = 0     //  已入库金额
         params.intoQty = 0     //  已入库数量       
-        if (this.data.flgHandleSetting){
+        if (this.data.flgHandleSetting) {
             params.flgAutoHandle = true
-        }  else{
+        } else {
             params.flgAutoHandle = btnFormData ? btnFormData.flag : false //自动出入库标识 
-        }           
+        }
         // 系统参数
         params.flgHandleSetting = this.data.flgHandleSetting
         params.orgId = formData.orgId  //组织部门

+ 1 - 1
package-inventory/pages/other-warehousing/other-warehousing.wxml

@@ -3,7 +3,7 @@
 
 <loading wx:if="{{loading}}"></loading>
 
-<dk-form-bill type="pur" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel" descCol="skuName"   priceCol="pricePur" pupPriceCol="pricePurchase" iconCol="imagesUrl"  quantityCol="itemQty" sumQuantityCol="itemQty" sumAmountCol="itemAmt" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" bind:editItems="setGoods" table="{{table}}"
+<dk-form-bill type="pur" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel" descCol="skuName"   priceCol="priceInto" pupPriceCol="pricePurchase" iconCol="imagesUrl"  quantityCol="itemQty" sumQuantityCol="itemQty" sumAmountCol="itemAmt" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" bind:editItems="setGoods" table="{{table}}"
 bind:delItem="setGoods" bind:setGoods="setGoods">
 </dk-form-bill>
 <view style="height: 200rpx;"></view>