Ver código fonte

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

姜永辉 1 ano atrás
pai
commit
d0453ac2fb

+ 1 - 1
api/pages/ivt/outbound.js

@@ -11,7 +11,7 @@ module.exports = {
   outboundService: {
     // 前缀
     prefix: 'mdm-server/ivt/outbound/',
-    outboundRepeal: 'repeal/'
+    outboundRepeal: 'repeal/',
   },
 
   routeUrl: {

+ 2 - 2
api/pages/ivt/saleOutBound.js

@@ -16,8 +16,8 @@ module.exports = {
     handleOutbound: 'handle_outbound',
     getOutboundForUpdate:'get_outbound_for_update',
     repeal:'repeal',
-    selectByCondDetail:'select_by_cond_detail', //总单带明细
-    
+    selectByCondDetail:'select_by_cond_detail', //总单带明细 
+    outboundInsertCollection:'outbound_insert_collection',
     saleOrderOutboundCancel: 'sale_order_outbound_cancel',
   },
 

+ 10 - 3
components/dkbase/dk-form-bill/dk-form-bill.js

@@ -1205,7 +1205,7 @@ Component({
      * @author : 周兴
      * @date   : 2024/2/2 11:46
      */
-    clearField(e) {
+    clearField(e) { 
       // 只读
       if (this.data.readonly) {
         return;
@@ -1229,6 +1229,10 @@ Component({
      * @date   : 2024/2/2 11:46
      */
     clearAddress(e) {
+         // 明细 只读只读240320
+         if (this.data.readonly) {
+          return;
+        }
       let form = this.data.form
       delete form['address']
       delete form['addressName'];
@@ -1328,12 +1332,15 @@ Component({
      * @author : 周兴
      * @date   : 2024/2/2 11:46
      */
-    clearChoose(e) {
-
+    clearChoose(e) { 
       let ds = e.currentTarget.dataset
       let key = ds.key
       let name = ds.name
       let item = ds.item
+        // 明细 只读只读240320
+        if (this.data.readonly) {
+          return;
+        }
       // 明细 只读只读240320
       if (item.readonlyItem) {
         return;

+ 1 - 1
components/dkbase/dk-form-bill/dk-form-bill.wxml

@@ -204,7 +204,7 @@
             </van-field>
 
             <!--文本框-->
-            <van-field wx:if="{{item.type=='str' && (item.show || item.show == undefined) && !item.hide }}" required="{{item.required?true:false }}" data-key="{{item.code}}" auto-focus="{{true}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" value="{{ form[item.code]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" autosize clearable border="{{ false }}" readonly="{{!!item.readonly}}" input-class="dk-cell-value-class" maxlength="{{item.maxlength?item.maxlength:50}}" right-icon="{{item.rightIcon}}" bind:change="changeField" bind:blur="blurField" bind:clear="clearField" errorMessage="{{item.errMsg}}">
+            <van-field wx:if="{{item.type=='str' && (item.show || item.show == undefined) && !item.hide }}" required="{{item.required?true:false }}" data-key="{{item.code}}" auto-focus="{{true}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" value="{{ form[item.code]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" autosize clearable border="{{ false }}" readonly="{{!!readonly || !!item.readonly}}"  input-class="dk-cell-value-class" maxlength="{{item.maxlength?item.maxlength:50}}" right-icon="{{item.rightIcon}}" bind:change="changeField" bind:blur="blurField" bind:clear="clearField" errorMessage="{{item.errMsg}}">
               <van-icon wx:if="{{item.tip}}" slot="label-icon" name="question-o" data-item="{{item}}" catchtap="showTip" />
             </van-field>
             <!--选单-->

+ 1 - 1
config/config.js

@@ -3,7 +3,7 @@ const profiles = 'dev';
 const configListObj = {
   // 北京东科企信软件有限公司 本地开发
   dev: {
-    server_add: 'http://192.168.0.57',     server_port: '7001',
+    server_add: 'http://192.168.0.55',     server_port: '7001',
     upload_url:'https://s.dev01.dkiboss.com:7000/api/mdm-server/file/upload',
     image_url:'https://s.dev01.dkiboss.com:7000/file',
     corpid: 'ww796c5d1684937b2f', //企业微信corpid

+ 189 - 204
package-base-select/pages/select-collection_confirm/select-collection_confirm.js

@@ -34,15 +34,15 @@ mixins: [mixins],
       orderService: app.globalData['orderService'],
       otherPayableService: app.globalData['otherPayableService'],
       saleOutBoundReturnService: app.globalData['saleOutBoundReturnService'],
-      outboundService: app.globalData['outboundService'],
+      saleOutBoundService: app.globalData['saleOutBoundService'],
 
     },
 
     /**
-    * @desc : 设置查询参数
-    * @date : 2024年3月8日
-    * @author : 姜永辉
-    */
+     * @desc : 设置查询参数
+     * @date : 2024年3月8日
+     * @author : 姜永辉
+     */
     setSearchParams(params) {
       return params;
     },
@@ -65,8 +65,8 @@ mixins: [mixins],
       let formData = JSON.parse(this.data.item)
       //  根据formtype不同值 
       // formType :1 收款单 ,2 付款单,3 客户收款保存参数,4 客户退款 5 退收款单 6 退付款单  7 订单开单收款
-      if (this.data.formType == 1 || this.data.formType == 2
-        || this.data.formType == 5 || this.data.formType == 6) {
+      if (this.data.formType == 1 || this.data.formType == 2 ||
+        this.data.formType == 5 || this.data.formType == 6) {
         formData.sumAmount = formData.sumAmount
       }
       this.setData({
@@ -116,10 +116,10 @@ mixins: [mixins],
     },
 
     /**
-    * @desc : 将优惠和本次核销的金额分摊到应收单据的明细里
-    * @date : 2024/2/1 15:49
-    * @author : 姜永辉
-    */
+     * @desc : 将优惠和本次核销的金额分摊到应收单据的明细里
+     * @date : 2024/2/1 15:49
+     * @author : 姜永辉
+     */
     setReturnReceivableList(list, sumWaiveAmt, currentReceivableResidue, totalAmount) {
       let retList = []
       if (sumWaiveAmt == null || sumWaiveAmt == undefined) {
@@ -203,21 +203,23 @@ mixins: [mixins],
       let itemList = []
       //收付款类型-收款的查询参数
       params.rpType = params.rpType ? params.rpType : Constants.rpType.receipt
-      params.orgId = form.orgId  //组织部门
-      params.staffId = form.staffId  // 员工
+      params.orgId = form.orgId //组织部门
+      params.staffId = form.staffId // 员工
       // 合计优惠金额
       params.sumWaiveAmt = 0
       params.annexPaths = form.annexPaths ? form.annexPaths : []
-      params.accDate = form.accDate  // 
-      params.remarks = form.remarks  // 备注
-      params.makeStaff = app.globalData.user.staffId  // 制单人 
-      let tableData = this.data.tableData.filter(res => { return res.checked })
+      params.accDate = form.accDate // 
+      params.remarks = form.remarks // 备注
+      params.makeStaff = app.globalData.user.staffId // 制单人 
+      let tableData = this.data.tableData.filter(res => {
+        return res.checked
+      })
       //  根据formtype不同值 
       // formType :1 收款单 ,2 付款单,3 客户收款保存参数,4 客户退款 5 退收款单 6 退付款单  7 其他收入单 8 订单开单收款 9 其他支出 10 销售退款 的退款 11 销售出库的收款
       if (this.data.formType == 1) {
         params.rpType = Constants.rpType.receipt
         // 1 收款单
-        params.objectId = this.data.form.objInfo.cusId  // 客户
+        params.objectId = this.data.form.objInfo.cusId // 客户
         // 收款金额					
         params.sumAmtRec = Number(form.sumAmount)
         // 合计应收冲抵金额								
@@ -232,21 +234,19 @@ mixins: [mixins],
         let rlsit = this.setReturnReceivableList(form.receivableList || [], form.sumWaiveAmt, form.currentReceivableResidue, form.receivableResidue)
         params.receivableList = rlsit //应收收款的明细 
         tableData.forEach(item => {
-          itemList.push(
-            {
-              amtRec: item.sumAmount,
-              balance: item.balance,
-              macCode: item.macCode,
-              macId: item.macId,
-              macName: item.macName,
-            }
-          )
+          itemList.push({
+            amtRec: item.sumAmount,
+            balance: item.balance,
+            macCode: item.macCode,
+            macId: item.macId,
+            macName: item.macName,
+          })
         })
 
       } else if (this.data.formType == 2) {
         params.rpType = Constants.rpType.payment
         // 2 付款单,
-        params.objectId = this.data.form.objInfo.supId  // 供应商
+        params.objectId = this.data.form.objInfo.supId // 供应商
         // 收款金额					
         params.sumAmtPay = Number(form.sumAmount)
 
@@ -263,15 +263,13 @@ mixins: [mixins],
         params.payableList = rlsit //应付款的明细 
 
         tableData.forEach(item => {
-          itemList.push(
-            {
-              amtPay: item.sumAmount,
-              balance: item.balance,
-              macCode: item.macCode,
-              macId: item.macId,
-              macName: item.macName,
-            }
-          )
+          itemList.push({
+            amtPay: item.sumAmount,
+            balance: item.balance,
+            macCode: item.macCode,
+            macId: item.macId,
+            macName: item.macName,
+          })
         })
 
       } else if (this.data.formType == 3) {
@@ -284,22 +282,20 @@ mixins: [mixins],
           itemList = tableData
         } else {
           tableData.forEach(item => {
-            itemList.push(
-              {
-                amtRec: item.sumAmount,
-                balance: item.balance,
-                macCode: item.macCode,
-                macId: item.macId,
-                macName: item.macName,
-              }
-            )
+            itemList.push({
+              amtRec: item.sumAmount,
+              balance: item.balance,
+              macCode: item.macCode,
+              macId: item.macId,
+              macName: item.macName,
+            })
           })
         }
 
         params.accDate = params.accDate ? params.accDate : utils.formatDayTime(new Date())
         // 240521 最佳客户信息
         params.cusName = form.objInfo.cusName
-        params.cusPhone = form.objInfo.cusPhone 
+        params.cusPhone = form.objInfo.cusPhone
         params.addressArea = form.addressArea
         params.addressFull = form.addressFull
         params.addressGcj02 = form.addressGcj02
@@ -316,22 +312,20 @@ mixins: [mixins],
           itemList = tableData
         } else {
           tableData.forEach(item => {
-            itemList.push(
-              {
-                amtRec: item.sumAmount,
-                balance: item.balance,
-                macCode: item.macCode,
-                macId: item.macId,
-                macName: item.macName,
-              }
-            )
+            itemList.push({
+              amtRec: item.sumAmount,
+              balance: item.balance,
+              macCode: item.macCode,
+              macId: item.macId,
+              macName: item.macName,
+            })
           })
         }
         params.accDate = params.accDate ? params.accDate : utils.formatDayTime(new Date())
       } else if (this.data.formType == 5) {
         // 5 退收款单
         params.rpType = Constants.rpType.returnReceipt
-        params.objectId = this.data.form.objInfo.objectId  // 客户
+        params.objectId = this.data.form.objInfo.objectId // 客户
         // 收款金额					
         params.sumAmtRec = Number(form.sumAmount)
         // 合计应收冲抵金额								
@@ -345,21 +339,19 @@ mixins: [mixins],
         let rlsit = this.setReturnReceivableList(form.receivableList || [], form.sumWaiveAmt, form.currentReceivableResidue, form.receivableResidue)
         params.receivableList = rlsit //应收收款的明细 
         tableData.forEach(item => {
-          itemList.push(
-            {
-              amtRec: item.sumAmount,
-              balance: item.balance,
-              macCode: item.macCode,
-              macId: item.macId,
-              macName: item.macName,
-            }
-          )
+          itemList.push({
+            amtRec: item.sumAmount,
+            balance: item.balance,
+            macCode: item.macCode,
+            macId: item.macId,
+            macName: item.macName,
+          })
         })
 
       } else if (this.data.formType == 6) {
         // 6 退付款单,
         params.rpType = Constants.rpType.returnPayment
-        params.objectId = this.data.form.objInfo.objectId  // 供应商
+        params.objectId = this.data.form.objInfo.objectId // 供应商
         // 收款金额					
         params.sumAmtPay = Number(form.sumAmount)
 
@@ -375,27 +367,25 @@ mixins: [mixins],
         params.payableList = rlsit //应付款的明细 
 
         tableData.forEach(item => {
-          itemList.push(
-            {
-              amtPay: item.sumAmount,
-              balance: item.balance,
-              macCode: item.macCode,
-              macId: item.macId,
-              macName: item.macName,
-            }
-          )
+          itemList.push({
+            amtPay: item.sumAmount,
+            balance: item.balance,
+            macCode: item.macCode,
+            macId: item.macId,
+            macName: item.macName,
+          })
         })
       } else if (this.data.formType == 7) { //其他收入单
         let formData = JSON.parse(this.data.formData)
         //收付款类型-收款的查询参数
         params.objectType = '对象类型-客户'
         params.objectId = formData.objInfo.cusId
-        params.orgId = formData.orgId  //组织部门
-        params.staffId = formData.staffId  // 员工
+        params.orgId = formData.orgId //组织部门
+        params.staffId = formData.staffId // 员工
         params.accDate = formData.accDate
         params.annexPaths = formData.annexPaths || [] //附件 
-        params.remarks = formData.remarks  // 备注
-        params.makeStaff = app.globalData.user.staffId  // 制单人  
+        params.remarks = formData.remarks // 备注
+        params.makeStaff = app.globalData.user.staffId // 制单人  
         let itemNumber = 0
         //收入类别list
         formData.itemList.forEach(element => {
@@ -411,14 +401,12 @@ mixins: [mixins],
         let receiptList = []
         //收款方式list
         tableData.forEach(item => {
-          receiptList.push(
-            {
-              amtRec: item.sumAmount,
-              macCode: item.macCode,
-              macId: item.macId,
-              macName: item.macName,
-            }
-          )
+          receiptList.push({
+            amtRec: item.sumAmount,
+            macCode: item.macCode,
+            macId: item.macId,
+            macName: item.macName,
+          })
         })
         params.receiptList = receiptList
         params.sumAmtReceivable = itemNumber //合计应收
@@ -428,16 +416,14 @@ mixins: [mixins],
         params.sumAmtRec = Number(params.sumAmtRec)
         let itemIndex = Number(1)
         tableData.forEach(item => {
-          itemList.push(
-            {
-              itemIndex: itemIndex++,
-              amtRec: item.sumAmount,
-              balance: item.balance,
-              macCode: item.macCode,
-              macId: item.macId,
-              macName: item.macName,
-            }
-          )
+          itemList.push({
+            itemIndex: itemIndex++,
+            amtRec: item.sumAmount,
+            balance: item.balance,
+            macCode: item.macCode,
+            macId: item.macId,
+            macName: item.macName,
+          })
         })
         params.accDate = params.accDate ? params.accDate : utils.formatDayTime(new Date())
         params.receiptList = itemList
@@ -471,117 +457,116 @@ mixins: [mixins],
         params.sumAmtPay = formData.sumAmount
         let paymentList = []
         tableData.forEach(item => {
-          paymentList.push(
-            {
-              amtPay: item.sumAmount,
-              macCode: item.macCode,
-              macId: item.macId,
-              macName: item.macName,
-            }
-          )
+          paymentList.push({
+            amtPay: item.sumAmount,
+            macCode: item.macCode,
+            macId: item.macId,
+            macName: item.macName,
+          })
         })
         params.paymentList = paymentList
-      }else if (this.data.formType == 10) { //销售退货 >>> 客户退款 
+      } else if (this.data.formType == 10) { //销售退货 >>> 客户退款 
         //新建销售退货参数
         let itemIndex = 0
-        let formData = JSON.parse(this.data.formData) 
+        let formData = JSON.parse(this.data.formData)
         params.fromId = formData.orderId
-        let btnFormData = formData.btnFormData 
+        let btnFormData = formData.btnFormData
         params.flgAutoHandle = btnFormData ? btnFormData.flag : false //自动出库标识 
-        formData.goodsList.forEach(res => { 
+        formData.goodsList.forEach(res => {
           res.itemIndex = itemIndex++
-          res.canNegativeFlag = true 
+          res.canNegativeFlag = true
           if (params.flgAutoHandle) {
             res.outBox = res.box
             res.outPiece = res.piece
           } else {
             res.outingBox = res.box
             res.outingPiece = res.piece
-          } 
-            delete res['itemId']  
-        }) 
-         itemList = formData.goodsList //明细  
+          }
+          delete res['itemId']
+        })
+        itemList = formData.goodsList //明细  
         params.makeStaff = app.globalData.user.staffId
         // params.deleteItemList = params.deleteList ? params.deleteList : []  
         params.addressName = formData.addressName
         params.objectId = formData.cusId
         params.canNegativeFlag = true
-        params.outDate = utils.formatDayTime(new Date())  
-           //客户退款保存参数 
-           params.sumAmtRec = Number(formData.sumAmtRec)
-           params.rpType = Constants.rpType.returnReceipt
-           //编辑退款 
-           let itemListRecPayItemVO = []
-             tableData.forEach(item => {
-              itemListRecPayItemVO.push(
-                 {
-                   amtRec: item.sumAmount,
-                   balance: item.balance,
-                   macCode: item.macCode,
-                   macId: item.macId,
-                   macName: item.macName,
-                 }
-               )
-             })
-             params.accDate = params.accDate ? params.accDate : utils.formatDayTime(new Date())  
-             params.itemListRecPayItemVO = itemListRecPayItemVO
-      }else if (this.data.formType == 10) { //销售出库>>> 客户收款 
-              //新建销售退货参数
-              let itemIndex = 0
-              let formData = JSON.parse(this.data.formData) 
-              params.fromId = formData.orderId
-              let btnFormData = formData.btnFormData 
-              params.flgAutoHandle = btnFormData ? btnFormData.flag : false //自动出库标识 
-              formData.goodsList.forEach(res => { 
-                res.itemIndex = itemIndex++
-                res.canNegativeFlag = true 
-                if (params.flgAutoHandle) {
-                  res.outBox = res.box
-                  res.outPiece = res.piece
-                } else {
-                  res.outingBox = res.box
-                  res.outingPiece = res.piece
-                } 
-                  delete res['itemId']  
-              }) 
-               itemList = formData.goodsList //明细  
-              params.makeStaff = app.globalData.user.staffId
-              // params.deleteItemList = params.deleteList ? params.deleteList : []  
-              params.addressName = formData.addressName
-              params.objectId = formData.cusId
-              params.canNegativeFlag = true
-              params.outDate = utils.formatDayTime(new Date())  
-                 //客户退款保存参数 
-                 params.sumAmtRec = Number(formData.sumAmtRec)
-                 params.rpType = Constants.rpType.returnReceipt
-                 //编辑退款 
-                 let itemListRecPayItemVO = []
-                   tableData.forEach(item => {
-                    itemListRecPayItemVO.push(
-                       {
-                         amtRec: item.sumAmount,
-                         balance: item.balance,
-                         macCode: item.macCode,
-                         macId: item.macId,
-                         macName: item.macName,
-                       }
-                     )
-                   })
-                   params.accDate = params.accDate ? params.accDate : utils.formatDayTime(new Date())  
-                   params.itemListRecPayItemVO = itemListRecPayItemVO
-            }
+        params.outDate = utils.formatDayTime(new Date())
+        //客户退款保存参数 
+        params.sumAmtRec = Number(formData.sumAmtRec)
+        params.rpType = Constants.rpType.returnReceipt
+        //编辑退款 
+        let itemListRecPayItemVO = []
+        tableData.forEach(item => {
+          itemListRecPayItemVO.push({
+            amtRec: item.sumAmount,
+            balance: item.balance,
+            macCode: item.macCode,
+            macId: item.macId,
+            macName: item.macName,
+          })
+        })
+        params.accDate = params.accDate ? params.accDate : utils.formatDayTime(new Date())
+        params.itemListRecPayItemVO = itemListRecPayItemVO
+      } else if (this.data.formType == 11) { //销售出库>>> 客户收款 
+        //新建销售退货参数
+        let itemIndex = 0
+        let formData = JSON.parse(this.data.formData)
+        params.fromId = formData.orderId
+        let btnFormData = formData.btnFormData
+        params.flgAutoHandle = btnFormData ? btnFormData.flag : false //自动出库标识 
+        params.outAmt = null
+        params.outQty = null
+        formData.goodsList.forEach(res => {
+          res.itemIndex = itemIndex++
+          res.canNegativeFlag = false
+          res.outAmt = null
+          res.outQty = null
+          if (params.flgAutoHandle) {
+            res.outBox = res.box
+            res.outPiece = res.piece
+          } else {
+            res.outingBox = res.box
+            res.outingPiece = res.piece
+          }
+        })
+
+        itemList = formData.goodsList //明细  
+        params.makeStaff = app.globalData.user.staffId
+        // params.deleteItemList = params.deleteList ? params.deleteList : []  
+        params.addressName = formData.addressName
+        params.salesChannel = formData.channelId
+        params.objectId = formData.cusId
+        params.canNegativeFlag = false
+        params.outDate = utils.formatDayTime(new Date())
+        //客户退款保存参数 
+        params.sumAmtRec = Number(formData.sumAmtRec)
+        params.rpType = Constants.rpType.returnReceipt
+        //编辑退款 
+        let itemListRecPayItemVO = []
+        tableData.forEach(item => {
+          itemListRecPayItemVO.push({
+            amtRec: item.sumAmount,
+            balance: item.balance,
+            macCode: item.macCode,
+            macId: item.macId,
+            macName: item.macName,
+          })
+        })
+        params.accDate = params.accDate ? params.accDate : utils.formatDayTime(new Date())
+        params.itemListRecPayItemVO = itemListRecPayItemVO
+      }
 
       if (this.data.formType !== 8) {
         params.itemList = itemList
-      } 
+      }
       return params
     },
 
     /**
-    * @desc : 收款保存
-    * @date : 2024/2/1 15:49
-    * @author : 姜永辉
-    */
+     * @desc : 收款保存
+     * @date : 2024/2/1 15:49
+     * @author : 姜永辉
+     */
     saveData() {
       //  根据formtype不同值  
       // formType :1 收款单 ,2 付款单, 3 客户收款  4 客户退款  5 退收款单 6 退付款单  7 其他收入单 8 订单开单收款  9 其他支出
@@ -600,7 +585,7 @@ mixins: [mixins],
           return this.excute(this.data.service, this.data.service.update, this.data.params)
         } else {
           return this.excute(this.data.service, this.data.service.insertRefund, this.data.params)
-        } 
+        }
       } else if (this.data.formType == 5) {
         return this.excute(this.data.service, this.data.service.insertReceivableReceipt, this.data.params)
       } else if (this.data.formType == 6) {
@@ -617,20 +602,20 @@ mixins: [mixins],
 
       } else if (this.data.formType == 9) {
         return this.excute(this.data.otherPayableService, this.data.otherPayableService.insert, this.data.params);
-      }else if (this.data.formType == 10) { //销售退货 >>> 客户退款
+      } else if (this.data.formType == 10) { //销售退货 >>> 客户退款
         return this.excute(this.data.saleOutBoundReturnService, this.data.saleOutBoundReturnService.outboundInsertRefund, this.data.params);
- 
-      }else if (this.data.formType == 11) { //销售出库 >>> 客户收款
-    
-        return this.excute(this.data.outboundService, this.data.outboundService.outboundInsertRefund, this.data.params);
-       
-      } 
+
+      } else if (this.data.formType == 11) { //销售出库 >>> 客户收款
+
+        return this.excute(this.data.saleOutBoundService, this.data.saleOutBoundService.outboundInsertCollection, this.data.params);
+
+      }
     },
     /**
-      * @desc :   处理保存返回数据
-      * @date : 2024年3月8日
-      * @author : 姜永辉
-      */
+     * @desc :   处理保存返回数据
+     * @date : 2024年3月8日
+     * @author : 姜永辉
+     */
     handleData() {
       if (this.data.formType == 3 || this.data.formType == 4) { //客户收款/退款 
         let pages = getCurrentPages();
@@ -641,7 +626,7 @@ mixins: [mixins],
         // wx.navigateBack({
         //   delta: 1
         // })
- 
+
       } else if (this.data.formType == 8) { //订单收款
         let pages = getCurrentPages();
         let prevPage = pages[pages.length - 2]; //上1页
@@ -659,9 +644,9 @@ mixins: [mixins],
       wx.previewImage({
         urls: imgs,
         current: e.currentTarget.dataset.imgurl, //当前图片地址
-        success: function (res) { },
-        fail: function (res) { },
-        complete: function (res) { },
+        success: function (res) {},
+        fail: function (res) {},
+        complete: function (res) {},
       })
     },
 
@@ -708,10 +693,10 @@ mixins: [mixins],
     },
 
     /**
-      * @desc : 计算多选金额
-      * @date : 2024/3/20 15:49
-      * @author : 于继渤
-      */
+     * @desc : 计算多选金额
+     * @date : 2024/3/20 15:49
+     * @author : 于继渤
+     */
     calculationScale(tableData) {
       let form = this.data.form
       tableData = tableData.filter((item) => {

+ 1 - 0
package-base-select/pages/select-source-sale-out-order/select-source-sale-out-order.js

@@ -48,6 +48,7 @@ setSearchParams(params) {
   params.outStatus = Constants.outStatus.outBounded
   params.outType = Constants.outType.sale
   params.cusId = this.data.item.id
+  params.flgValid = true
   return params
 },
   

+ 1 - 1
package-sales/pages/order-return/add/add.js

@@ -582,7 +582,7 @@ Page({
         if (res.data.data.data.outStatus == mixins.$t("outBoundedOutStatus") && this.data.formMode != 'other') {
           let buttonSaveList = this.data.buttonSaveList
           buttonSaveList = [{
-            name: 'merge',
+            code: 'merge',
             title: mixins.$t("handleWithdrawal"),
           }]
           this.setData({

+ 5 - 0
package-sales/pages/order-return/order-return.js

@@ -154,7 +154,12 @@ onChangeTabs(e) {
           image: '/static/image/success.png',
           duration: 1000
         })
+         // 查询
+         this.searchData();
       }
+      this.setData({
+        loading: false
+      })
     })
   },
   /**

+ 38 - 9
package-sales/pages/sales-outbound/add/add.js

@@ -324,26 +324,32 @@ Page({
     params.fromId = params.orderId
     // params.outingAmt = params.outAmt
     // params.outingQty = params.outQty
+    let btnFormData = this.data.btnFormData ? JSON.parse(this.data.btnFormData) : ''
+    if (this.data.flgHandleSetting) {
+      params.flgAutoHandle = true
+    } else {
+      params.flgAutoHandle = btnFormData ? btnFormData.flag : false //自动出入库标识 
+    }
     params.outAmt = null
     params.outQty = null
     params.goodsList.forEach(res => {
       res.canNegativeFlag = false
       res.outAmt = null
       res.outQty = null
-      res.outingBox = res.box
-      res.outingPiece = res.piece
+      if (params.flgAutoHandle) {
+        res.outBox = res.box
+        res.outPiece = res.piece
+      } else {
+        res.outingBox = res.box
+        res.outingPiece = res.piece
+      } 
       // delete
     })
 
     params.itemList = params.goodsList //明细
     params.makeStaff = app.globalData.user.staffId
     // params.deleteItemList = params.deleteList ? params.deleteList : []
-    let btnFormData = this.data.btnFormData ? JSON.parse(this.data.btnFormData) : ''
-    if (this.data.flgHandleSetting) {
-      params.flgAutoHandle = true
-    } else {
-      params.flgAutoHandle = btnFormData ? btnFormData.flag : false //自动出入库标识 
-    }
+  
     // 系统参数
     params.flgHandleSetting = this.data.flgHandleSetting
     params.addressName = params.address.addressName ? params.address.addressName : params.address.name
@@ -569,6 +575,25 @@ Page({
         formData.goodsList = listData
         //处理默认值  业务员业务部门
         formData = this.setStaffOrg(formData)
+
+        if (this.data.formMode == Constants.formMode.detail) { //详情
+          if(!formData.flgValid) { //作废单据
+             this.setData({
+               unOrderFlgValid:true,
+               buttonSaveList:[],
+               contentSaveList: [ 
+              {
+                code: 'receivable',
+                content: 0,
+                type: 'number',
+                title: mixins.$t("saleCollection")
+              }
+              ],
+             })
+          }
+        }
+        
+
         //设置选商品不可用
         let cardList = this.data.cardList
         cardList.forEach(element => {
@@ -620,6 +645,7 @@ Page({
    * @author : 于继渤
    */
   saveButton(e) {
+
     let name = e.detail.name
     // this.showQuestion().then(res => {
     //   if (!res) {
@@ -703,6 +729,8 @@ Page({
         element.saleDiscount = data.saleDiscount
       }
     })
+    
+  
     this.setData({
       cardList: cardList,
       formData: JSON.stringify(data),
@@ -1471,7 +1499,8 @@ Page({
         isDetailFlag: true,
       })
       this.setData({
-        formData: JSON.stringify(formData)
+        formData: JSON.stringify(formData),
+        contentSaveList:[]
       })
     } else if (this.data.formMode == Constants.formMode.detailEdit) {
       //编辑

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

@@ -11,7 +11,7 @@
 <view style="height: 200rpx;"></view>
 
 <!-- 底部加号" -->
-<view wx:if="{{formMode =='detail'}}" style="position: fixed;bottom: 230rpx;right: 30rpx;z-index: 99;" bindtap="toEdit">
+<view wx:if="{{(!unOrderFlgValid)&&formMode =='detail'}}" style="position: fixed;bottom: 230rpx;right: 30rpx;z-index: 99;" bindtap="toEdit">
   <image src="{{imageUrl + 'edit.png'}} " class="edit-class"  />
 </view>
 

+ 191 - 173
package-sales/pages/sales-outbound/sales-outbound.js

@@ -39,6 +39,73 @@ Page({
     }],
     // 列表区(内容)
     contentList: [{
+      name: 'outNo',
+      title: mixins.$t("outOrderNo")
+    },
+    {
+      name: 'cusPhone',
+      title: mixins.$t("cusPhone")
+    },
+    {
+      name: 'addressFull',
+      title: mixins.$t("adddressFull")
+    },
+    {
+      name: [{
+        name: 'orgName',
+        title: ''
+      }, {
+        name: 'staffName',
+        title: mixins.$t("staffId")
+      }],
+      title: mixins.$t("storeInformation")
+    }
+    ],
+    // 查询条件
+    searchContent: [{
+      code: 'createtime',
+      title: mixins.$t("pastThirthtyDays"),
+      defaultValue: 5,
+      searchType: Constants.searchType.date
+    },
+    {
+      code: 'staff',
+      title: mixins.$t("staffId"),
+      dropType: 'staff'
+    },
+    {
+      code: 'org',
+      title: mixins.$t("orgId"),
+      dropType: 'org'
+    },
+    {
+      code: 'choose',
+      title: mixins.$t("choose"),
+      searchType: Constants.searchType.pick
+    }
+    ],
+    // 查询条件-筛选
+    pullMenuList: [{
+      code: 'outStatus',
+      pullType: 'mSelect',
+      typeName: 'outStatus'
+    },
+    {
+      code: 'receiveStatus',
+      pullType: 'mSelect',
+      typeName: 'receiveStatus'
+    },
+    {
+      code: 'delivery_Time',
+      dataType: 'date'
+    },
+    {
+      code: 'viewVoidedDocuments',
+      dataType: 'checkbox'
+    },
+    ],
+    contentObj: {
+      '待出库': [{
         name: 'outNo',
         title: mixins.$t("outOrderNo")
       },
@@ -60,119 +127,52 @@ Page({
         }],
         title: mixins.$t("storeInformation")
       }
-    ],
-    // 查询条件
-    searchContent: [{
-        code: 'createtime',
-        title: mixins.$t("pastThirthtyDays"),
-        defaultValue: 5,
-        searchType: Constants.searchType.date
+      ],
+      '出库中': [{
+        name: 'outNo',
+        title: mixins.$t("outOrderNo")
       },
       {
-        code: 'staff',
-        title: mixins.$t("staffId"),
-        dropType: 'staff'
+        name: 'cusPhone',
+        title: mixins.$t("cusPhone")
       },
       {
-        code: 'org',
-        title: mixins.$t("orgId"),
-        dropType: 'org'
+        name: 'addressFull',
+        title: mixins.$t("adddressFull")
       },
       {
-        code: 'choose',
-        title: mixins.$t("choose"),
-        searchType: Constants.searchType.pick
+        name: [{
+          name: 'orgName',
+          title: ''
+        }, {
+          name: 'staffName',
+          title: mixins.$t("staffId")
+        }],
+        title: mixins.$t("storeInformation")
       }
-    ],
-    // 查询条件-筛选
-    pullMenuList: [{
-        code: 'outStatus',
-        pullType: 'mSelect',
-        typeName: 'outStatus'
+      ],
+      '已出库': [{
+        name: 'outNo',
+        title: mixins.$t("outOrderNo")
       },
       {
-        code: 'receiveStatus',
-        pullType: 'mSelect',
-        typeName: 'receiveStatus'
+        name: 'cusPhone',
+        title: mixins.$t("cusPhone")
       },
       {
-        code: 'delivery_Time',
-        dataType: 'date'
+        name: 'addressFull',
+        title: mixins.$t("adddressFull")
       },
       {
-        code: 'viewVoidedDocuments',
-        dataType: 'checkbox'
-      },
-    ],
-    contentObj: {
-      '待出库': [{
-          name: 'outNo',
-          title: mixins.$t("outOrderNo")
-        },
-        {
-          name: 'cusPhone',
-          title: mixins.$t("cusPhone")
-        },
-        {
-          name: 'addressFull',
-          title: mixins.$t("adddressFull")
-        },
-        {
-          name: [{
-            name: 'orgName',
-            title: ''
-          }, {
-            name: 'staffName',
-            title: mixins.$t("staffId")
-          }],
-          title: mixins.$t("storeInformation")
-        }
-      ],
-      '出库中': [{
-          name: 'outNo',
-          title: mixins.$t("outOrderNo")
-        },
-        {
-          name: 'cusPhone',
-          title: mixins.$t("cusPhone")
-        },
-        {
-          name: 'addressFull',
-          title: mixins.$t("adddressFull")
-        },
-        {
-          name: [{
-            name: 'orgName',
-            title: ''
-          }, {
-            name: 'staffName',
-            title: mixins.$t("staffId")
-          }],
-          title: mixins.$t("storeInformation")
-        }
-      ],
-      '已出库': [{
-          name: 'outNo',
-          title: mixins.$t("outOrderNo")
-        },
-        {
-          name: 'cusPhone',
-          title: mixins.$t("cusPhone")
-        },
-        {
-          name: 'addressFull',
-          title: mixins.$t("adddressFull")
-        },
-        {
-          name: [{
-            name: 'orgName',
-            title: ''
-          }, {
-            name: 'staffName',
-            title: mixins.$t("staffId")
-          }],
-          title: mixins.$t("storeInformation")
-        }
+        name: [{
+          name: 'orgName',
+          title: ''
+        }, {
+          name: 'staffName',
+          title: mixins.$t("staffId")
+        }],
+        title: mixins.$t("storeInformation")
+      }
       ],
     },
     buttonSaveList: [{
@@ -201,85 +201,98 @@ Page({
   /**
    * @desc :   三个小点打开
    * @date : 2024年3月8日
-   * @author : 于继渤
+   * @author : 于继渤 
    */
   toPoint(e) {
     let item = e.detail.item
-    let buttonList = null
-    //除了已入库 不显示销售退货
-    if (item.outStatus == Constants.outStatus.outBounded) { //"出库状态-已出库"
-      buttonList = [{
-          name: 'editInto',
-          title: mixins.$t('edit')
-        },
-        {
-          name: 'salesOutbound',
-          title: mixins.$t("outProcessing")
-        },
-        {
-          name: 'saleOrderReturn',
-          title: mixins.$t("saleReturn"),
-          formMode: Constants.formMode.other,
-          other: {
-            idKey: 'outId'
-          },
-          formType: 'toSaleOut'
-        }, //退货 
-        {
-          name: 'cusCollection',
-          formType: Constants.formMode.add,
-          title: mixins.$t("cusCollection")
-        },{
-          name: 'cusReturnCollection',
-          formType: Constants.formMode.add,
-          title: mixins.$t("cusReturnCollection")
-        },
-        {
-          name: 'invalid',
-          title: mixins.$t("invaidOrder")
-        }, //作废
-        {
-          name: 'printedBill',
-          title: mixins.$t('printedBill') //打印票据
-        },
-      ]
+    let buttonList = null 
+    if (!item.flgValid) { //作废
+      buttonList= [    {
+        name: 'printedBill',
+        title: mixins.$t('printedBill') //打印票据
+      },]
     } else {
-      // 弹出按钮
-      buttonList = [{
-          name: 'editInto',
-          title: mixins.$t('edit')
-        }, {
-          name: 'salesOutbound',
-          title: mixins.$t("outProcessing")
-        },
-        {
-          name: 'cusCollection',
-          formType: Constants.formMode.add,
-          title: mixins.$t("cusCollection")
-        },
-        {
-          name: 'cusReturnCollection',
-          formType: Constants.formMode.add,
-          title: mixins.$t("cusReturnCollection")
-        },
-        {
-          name: 'invalid',
-          title: mixins.$t("invaidOrder")
-        }, //作废 
-        {
-          name: 'printedBill',
-          title: mixins.$t('printedBill') //打印票据
-        },
-      ]
-    }
-    //6460 标-免费版-销售出库-一览-三个点再加一个客户收款  除了标准版 其他的删除客户收款
-    if(this.data.gradeCode !== Constants.gradeCode.STD){
-      buttonList.forEach((element,index) => {
-            if(element.name == 'cusCollection'){
-              buttonList.splice(index, 1)
+      //除了已入库 不显示销售退货
+      if (item.outStatus == Constants.outStatus.outBounded) { //"出库状态-已出库"
+        buttonList = [{
+            name: 'editInto',
+            title: mixins.$t('edit')
+          },
+          {
+            name: 'salesOutbound',
+            title: mixins.$t("outProcessing")
+          },
+          {
+            name: 'saleOrderReturn',
+            title: mixins.$t("saleReturn"),
+            formMode: Constants.formMode.other,
+            other: {
+              idKey: 'outId'
+            },
+            formType: 'toSaleOut'
+          }, //退货 
+          {
+            name: 'cusCollection',
+            formType: Constants.formMode.add,
+            title: mixins.$t("cusCollection")
+          }, {
+            name: 'cusReturnCollection',
+            formType: Constants.formMode.add,
+            title: mixins.$t("cusReturnCollection")
+          },
+          {
+            name: 'invalid',
+            title: mixins.$t("invaidOrder")
+          }, //作废
+          {
+            name: 'printedBill',
+            title: mixins.$t('printedBill') //打印票据
+          },
+        ]
+      } else {
+        // 弹出按钮
+        buttonList = [{
+            name: 'editInto',
+            title: mixins.$t('edit')
+          }, {
+            name: 'salesOutbound',
+            title: mixins.$t("outProcessing")
+          },
+          {
+            name: 'cusCollection',
+            formType: Constants.formMode.add,
+            title: mixins.$t("cusCollection")
+          },
+          {
+            name: 'cusReturnCollection',
+            formType: Constants.formMode.add,
+            title: mixins.$t("cusReturnCollection")
+          },
+          {
+            name: 'invalid',
+            title: mixins.$t("invaidOrder")
+          }, //作废 
+          {
+            name: 'printedBill',
+            title: mixins.$t('printedBill') //打印票据
+          },
+        ]
+      }
+      //6460 标-免费版-销售出库-一览-三个点再加一个客户收款  除了标准版 其他的删除客户收款
+      if (this.data.gradeCode !== Constants.gradeCode.STD) {
+        if (buttonList.length > 0) {
+          for (let i = 0; i < buttonList.length; i++) {
+            if (buttonList[i].name == 'cusCollection') {
+              buttonList.splice(i, 1)
+              break
             }
-          });
+          }
+        }
+      }
+ 
+    
     }
+
     this.setData({
       // 弹出按钮
       buttonList: buttonList
@@ -335,7 +348,12 @@ Page({
           image: '/static/image/success.png',
           duration: 1000
         })
+        // 查询
+        this.searchData();
       }
+      this.setData({
+        loading: false
+      })
     })
   },
 

+ 1 - 1
project.private.config.json

@@ -5,5 +5,5 @@
         "preloadBackgroundData": false
     },
     "projectname": "iboss_wx_app",
-    "libVersion": "3.4.3"
+    "libVersion": "3.4.2"
 }