Răsfoiți Sursa

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

于继渤 2 ani în urmă
părinte
comite
f96418a0d5

+ 4 - 4
components/dkbusiness/dk-label-multiple-select/dk-label-multiple-select.js

@@ -144,8 +144,8 @@ Component({
         },
         
         {
-          name: '退入库',
-          id: '入库类型-退入库',
+          name: '退入库',
+          id: '入库类型-退入库',
           infotype: 'default'
         },
         {
@@ -225,8 +225,8 @@ Component({
         },
         
         {
-          name: '退出库',
-          id: '出库类型-退出库',
+          name: '退出库',
+          id: '出库类型-退出库',
           infotype: 'default'
         },
         {

+ 3 - 3
i18n/zh-CN.js

@@ -72,16 +72,16 @@ const ivt = {
   otherOutWh: '其他出库',
   purInBound: '采购入库',
   saleOutBound: '销售出库',
-  saleReturnInBound: '退入库',
+  saleReturnInBound: '退入库',
   purReturnOutBound: '采购退货',
   inBoundInfo: '入库信息',
   outBoundInfo: '出库信息',
   outObject: '出库对象',
   inObject: '入库对象',
   purIntoType: '入库类型-采购入库',
-  saleReturnIntoType: '入库类型-退入库',
+  saleReturnIntoType: '入库类型-退入库',
   otherIntoType: '入库类型-其他入库',
-  purReturnOutType: '出库类型-退出库',
+  purReturnOutType: '出库类型-退出库',
   saleOutType: '出库类型-销售出库',
   otherOutType: '出库类型-其他出库',
   outBoundedOutStatus: '出库状态-已出库',

+ 1 - 1
package-inventory/pages/outbound-processing/outbound-processing.js

@@ -81,7 +81,7 @@ Page({
     contentList: [],
 
     contentObj: {
-      '退出库': [{
+      '退出库': [{
         name: 'orderNo',
         title: mixins.$t('orderNo')
       }, {

+ 6 - 1
package-inventory/pages/warehousing-processing/detail/detail.js

@@ -128,7 +128,8 @@ Page({
                 }],
             })
         }
-        sumitemAmt = Number(data.intoingQty) * Number(data.intoingAmt)
+        console.log("sumitemAmt",data);
+        sumitemAmt =   Number(data.intoingAmt)
         cardList_.forEach(card => {
             if (card.name === 'items') {
                 if (formType == 1) {
@@ -146,6 +147,8 @@ Page({
         // 明细的最大入库办理的量
         data.goodsList.forEach(element => {
             if (this.data.item.intoType == Constants.intoType.saleReturn) {
+                element['intoingQty'] = -1 * Math.abs(element.intoingQty)
+                element.intoingAmt = -1 * Math.abs(element.intoingAmt)   //金额
                 element['intoingQty_max'] = -1
                 element['intoingQty_min'] = -1 * Math.abs(element.intoingQty)
             } else {
@@ -280,6 +283,8 @@ Page({
         if (this.data.item.intoType == Constants.intoType.saleReturn) {
             params.intoingAmt = -1 * Math.abs(formData.goodsList.sum("intoingAmt"))   //金额
             params.intoingQty = -1 * Math.abs(formData.goodsList.sum("intoingQty"))     //一共的商品数量
+            params.returnQty = params.intoingQty     //退货的量
+            params.returnAmt = params.intoingAmt     //退货的量
             params.intoAmt = 0     //  已入库金额
             params.outQty = 0     //  已入库数量   
             formData.goodsList.forEach(item => {

+ 1 - 1
package-inventory/pages/warehousing-processing/warehousing-processing.js

@@ -100,7 +100,7 @@ Page({
         name: 'intoDate',
         title: mixins.$t('intoDate')
       }],
-      '退入库': [{
+      '退入库': [{
         name: 'intoNo',
         title: mixins.$t('orderNo')
       }, {

+ 1 - 12
package-purchase/pages/purchase-order/add/add.js

@@ -88,18 +88,7 @@ Page({
                 title: mixins.$t('sourceOrder'), //'关联源单',
                 urlKey: 'chooseSaleOrder'
             }],
-            items: [{
-                code: 'collectType',
-                name: 'collectName',
-                type: 'drop',
-                required: true,
-                dropType: 'collect'
-            }, {
-                code: 'collectAmount',
-                type: 'number',
-                title: mixins.$t('amountCollected'), //'收款金额',
-                required: true
-            }],
+            items: [ ],
 
             other: [{
                 code: 'remarks',

+ 9 - 4
package-purchase/pages/purchase-receipt/add/add.js

@@ -87,12 +87,14 @@ Page({
                     name: 'staffName',
                     title: mixins.$t("procureStaff"), //'采购人',
                     type: 'choose',
+                    required: true,
                     urlKey: 'chooseStaff'
                 }, {
                     code: 'orgId',
                     name: 'orgName',
                     title: mixins.$t("procureOrg"), //'采购部门',
                     type: 'choose',
+                    required: true,
                     urlKey: 'chooseOrg'
                 },
             ],
@@ -112,8 +114,7 @@ Page({
                 title: mixins.$t("sourceOrder"), //'关联源单',
                 urlKey: 'choosePurchaseOrder'
             }],
-            items: [ ],
-
+            items: [ ], 
             other: [{
                 code: 'remarks',
                 type: 'textarea',
@@ -429,7 +430,7 @@ Page({
                     formData.whId = null
                     formData.whName = ""
                     that.setData({
-                        formData
+                        formData:JSON.stringify(formData)
                     })
                 }
             }
@@ -452,12 +453,15 @@ Page({
     setParams(params) {
         let btnFormData = this.data.btnFormData ? JSON.parse(this.data.btnFormData) : ''
         let formData = JSON.parse(this.data.formData)
+        formData.goodsList.forEach((element,index) => {
+            element.itemIndex = index
+        }); 
         params.intoingAmt = formData.goodsList.sum("intoingAmt") //金额
         params.intoingQty = formData.goodsList.sum("intoingQty") //一共的商品数量
         params.intoAmt = 0 //  已入库金额
         params.intoQty = 0 //  已入库数量         
         params.flgAutoHandle = btnFormData ? btnFormData.flag : false //自动出入库标识 
-        params.fromId = this.data.purIdArray //来源id
+        params.fromId = this.data.purIdArray?this.data.purIdArray:null //来源id
         params.fromNo = formData.fromNo //来源单号
         params.orgId = formData.orgId //组织部门
         params.staffId = formData.staffId // 员工
@@ -465,6 +469,7 @@ Page({
         params.whId = formData.whId // 仓库
         params.remarks = formData.remarks // 备注
         params.makeStaff = app.globalData.user.staffId // 制单人
+    
         params.itemList = formData.goodsList //商品明细
         console.log("save", this.data.params);
         return params

+ 18 - 17
package-purchase/pages/purchase-receipt/detail/detail.js

@@ -52,19 +52,7 @@ Page({
         title:  mixins.$t("sourceOrder"),//'关联源单'
         urlKey: 'choosePurchaseOrder'
       }],
-      items: [{
-        code: 'sumQuantity',
-        name: 'collectName',
-        type: 'drop',
-        required: true,
-        dropType: 'collect',
-
-      }, {
-        code: 'sumAmount',
-        type: 'number',
-        title:  mixins.$t("sourceOrder"),//'收款金额',
-        required: true
-      }],
+      items: [  ],
 
       other: [{
         code: 'remarks',
@@ -104,6 +92,7 @@ Page({
 
 
     inboundService: app.globalData['inboundService'],
+    inboundProcessingService: app.globalData['inboundProcessingService'],
     // 路由
     routeObjName: 'inbound',
   },
@@ -219,18 +208,22 @@ Page({
   setParams(params) {
 
     let formData = JSON.parse(this.data.formData)
+    formData.goodsList.forEach(element => {
+      element.sPurId = element.fromId //来源id
+      element.sPurItemId = element.fromItemId //来源单明细id
+    });
     params.allEdit = true //大编辑
     params.itemList = formData.goodsList //商品明细
     params.deleteItemList = []
     params.fromId = formData.fromId //来源id
-    params.fromNo = formData.fromNo //来源单号
+    params.fromNo = formData.fromNo //来源单号 
     params.orgId = formData.orgId //组织部门
     params.staffId = formData.staffId // 员工
     params.supId = formData.supId // 供应商
     params.whId = formData.whId // 仓库
     params.remarks = formData.remarks // 备注
     params.makeStaff = formData.staffId // 制单人
-
+    params.intoDate = this.formatDate()
     console.log("save", this.data.params);
     return params
   },
@@ -240,12 +233,20 @@ Page({
    * @author : 王英杰
    */
   saveData() {
-    if(this.data.formType==1){
-      return this.excute(this.data.service, this.data.service.purchaseHandleInbound+"/insert", this.data.params)
+    if(this.data.formType==1){ 
+      return this.excute(this.data.inboundProcessingService, this.data.inboundProcessingService.inBoundHandle, this.data.params)
     }else{
        wx.navigateBack({
         delta: 1
       }) 
     } 
   },
+  formatDate() {
+    var date = new Date();
+    var year = date.getFullYear();
+    var month = ("0" + (date.getMonth() + 1)).slice(-2);
+    var day = ("0" + date.getDate()).slice(-2);
+
+    return year + "-" + month + "-" + day;
+  },
 })

+ 2 - 2
utils/Constants.js

@@ -151,7 +151,7 @@ module.exports = {
   // 入库类型
   intoType: {
     pur: '入库类型-采购入库',
-    saleReturn: '入库类型-退入库',
+    saleReturn: '入库类型-退入库',
     other: '入库类型-其他入库',
   },
 
@@ -171,7 +171,7 @@ module.exports = {
 
   // 出库类型
   outType: {
-    purReturn: '出库类型-退出库',
+    purReturn: '出库类型-退出库',
     sale: '出库类型-销售出库',
     other: '出库类型-其他出库',
   },