王英杰 пре 1 година
родитељ
комит
03a59499ab

+ 1 - 1
components/dkbase/dk-number-phone-input/dk-number-phone-input.wxml

@@ -1,4 +1,4 @@
-<van-field input-width="{{inputWidth + 'rpx'}}" disabled="{{disabled}}" required = "{{required}}" input-class="dk-cell-class" style="--fontWeight--:{{fontWeight}};--color--:{{disabled?'#95A8CB':'#1B365D'}}" input-align="{{inputAlign}}" data-key="{{dataKey}}" maxlength="{{maxlength}}" type="{{type}}" clearable="{{clearable}}" value="{{ value }}" placeholder="{{placeholder}}" autosize border="{{ false }}" bind:change="changeField" bind:clear="clearField" right-icon="{{rightIcon}}" color="#95A8CB" readonly="{{readonly}}" bind:blur="changeFieldblur" data-value="{{value}}" data-icon="{{rightIcon}}" bind:onBindInput="{{disabledInput ? 'clickFieldInput': ''}}" error-message="{{errorMessage}}" bind:click-icon="onClickphone" label="{{label}}" bind:tap="copyPhone" label-class="{{labelClass}}">
+<van-field input-width="{{inputWidth + 'rpx'}}" disabled="{{disabled}}" required = "{{required}}" input-class="dk-cell-class" style="--fontWeight--:{{fontWeight}};--color--:{{disabled?'#95A8CB':'#1B365D'}}" input-align="{{inputAlign}}" data-key="{{dataKey}}" maxlength="{{maxlength}}" type="{{type}}" clearable="{{clearable}}" value="{{ value }}" placeholder="{{placeholder}}" autosize border="{{ false }}" bind:change="changeField" bind:clear="clearField" right-icon="{{rightIcon}}" color="#95A8CB" readonly="{{readonly}}" bind:blur="changeFieldblur" data-value="{{value}}" data-icon="{{rightIcon}}" bind:onBindInput="{{disabledInput ? 'clickFieldInput': ''}}" error-message="{{errorMessage}}" bind:click-icon="onClickphone" label="{{label}}" bind:toCopy="copyPhone" label-class="{{labelClass}}">
 
   <!-- <view slot="label"  catchtap="copyPhone" class="{{labelClass}}">{{label}}</view> -->
 </van-field>

+ 1 - 1
dist/field/index.js

@@ -58,7 +58,7 @@ VantComponent({
         */
         toCopy(e) {
             // 外露事件
-            this.triggerEvent('tap',e)
+            this.triggerEvent('toCopy',e)
             if(!this.data.copyValue)return;
             util.toCopy(this.data.copyValue, this.data.value);
         },

+ 30 - 30
package-base-select/pages/select-collection_confirm/select-collection_confirm.js

@@ -111,7 +111,8 @@ Page({
         tableData.forEach(item => {
           if(element.macId == item.macId){
             item.checked = true
-            item.sumAmount = element.amtRec
+            item.sumAmount = element.amtRec 
+            item.makeStaff = element.makeStaff ? element.makeStaff : null
           } 
         });
       });
@@ -330,12 +331,12 @@ Page({
       })
 
     } else if (this.data.formType == 3) { 
-      if (form.editFlag) {
-        tableData.forEach(res => {
-          res.amtRec = res.sumAmount
-        })
-        itemList = tableData
-      } else {
+      // if (form.editFlag) {
+      //   tableData.forEach(res => {
+      //     res.amtRec = res.sumAmount
+      //   })
+      //   itemList = tableData
+      // } else {
         tableData.forEach(item => {
           itemList.push({
             amtRec: item.sumAmount,
@@ -343,9 +344,10 @@ Page({
             macCode: item.macCode,
             macId: item.macId,
             macName: item.macName,
+            accDate :  utils.formatDayTime(new Date())
           })
         })
-      }
+      // }
       //客户收款保存参数
       params.sumAmtRec = Number(itemList.sum('amtRec'))
       params.accDate = params.accDate ? params.accDate : utils.formatDayTime(new Date())
@@ -467,29 +469,27 @@ Page({
       params.receiptList = receiptList
       params.sumAmtReceivable = itemNumber //合计应收
       params.sumAmtRec = form.sumAmount
-    } else if (this.data.formType == 8) { //订单开单收款
-      // let formData = JSON.parse(this.data.formData)
-      let formData = this.data.form
-      params = formData
-      params.sumAmtRec = Number(params.sumAmtRec)
-      let itemIndex = Number(1)
+    } else if (this.data.formType == 8) { //订单开单收款 
       tableData.forEach(item => {
         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
-      console.log('formData', formData)
-      params.sumAmount = this.data.sumAmountSocial
-      console.log('params', params)
-      delete params['sumAmtPay']
-      delete params['sumAmtRec']
+      }) 
+    //客户收款保存参数
+    params.sumAmtRec = Number(itemList.sum('amtRec'))
+    params.accDate = params.accDate ? params.accDate : utils.formatDayTime(new Date())
+    // 240521 最佳客户信息
+    params.cusName = form.objInfo.cusName
+    params.cusPhone = form.objInfo.cusPhone
+    params.addressArea = form.addressArea
+    params.addressFull = form.addressFull
+    params.addressGcj02 = form.addressGcj02
+    params.addressName = form.addressName
+    params.addressNo = form.addressNo  
     } else if (this.data.formType == 9) { //其他支出
       let formData = JSON.parse(this.data.formData)
       //收付款类型-收款的查询参数
@@ -617,9 +617,9 @@ Page({
       params.itemListRecPayItemVO = itemListRecPayItemVO
     }
 
-    if (this.data.formType !== 8) {
+    // if (this.data.formType !== 8) { 订单开单变成客户收款了 也就不限制了
       params.itemList = itemList
-    }
+    // }
     return params
   },
 
@@ -654,8 +654,8 @@ Page({
     } else if (this.data.formType == 7) {
       return this.excute(this.data.otherReceivableService, this.data.otherReceivableService.insert, this.data.params)
     } else if (this.data.formType == 8) {
-      if (this.data.params.updateFlag) {
-        return this.excute(this.data.orderService, this.data.receiptPaymentService.insertReceipt, this.data.params);
+      if (this.data.form.updateFlag) {
+        return this.excute(this.data.receiptPaymentService, this.data.receiptPaymentService.insertReceipt, this.data.params);
       } else {
         return this.excute(this.data.orderService, this.data.orderService.insert, this.data.params);
       }
@@ -752,9 +752,9 @@ Page({
   catchtapCheck(e) {
     let tableData = this.data.tableData
     let form = this.data.form
-    if (form.editFlag) {
-      return
-    }
+    // if (form.editFlag) {
+    //   return
+    // }
     let index = e.target.dataset.index
     tableData[index].checked = e.detail
     if (tableData && tableData.length > 0) {

+ 1 - 1
package-base-select/pages/select-collection_confirm/select-collection_confirm.wxml

@@ -77,7 +77,7 @@
 
     <view style="height: 38rpx;"></view>
     <view style="text-align:center;font-size: 15px;line-height: 20px;color: #1B365D;">
-      <dk-text fontSize="15px" value="收款"></dk-text>
+      <dk-text fontSize="15px" value="收款"></dk-text>
     </view>
     <view style="padding-top: 10rpx; text-align:center;">
 

+ 2 - 6
package-sales/pages/order-billing/detail/detail.js

@@ -34,11 +34,7 @@ Page({
         { code: 'file', type: 'uploader', title: mixins.$t('uploader'), readonly: true }
       ]
     },
-    //按钮
-    buttonSaveList: [
-      { code: 'collection', title: mixins.$t('collection'), width: '120rpx', color: '#CAA977' },
-      { code: 'save', title: mixins.$t('save'), width: '120rpx', color: '#1B365D' }
-    ],
+    
     contentSaveList: [
       { code: 'flag', title: mixins.$t('saleOutBoundFlag'), type: 'checkbox' },
       { code: 'receivable', content: 0, type: 'number', title: mixins.$t('saleCollection') },
@@ -81,7 +77,7 @@ Page({
 
     //按钮
     buttonSaveList: [
-      { code: 'collection', title: mixins.$t('collection'), plain: true }
+      // { code: 'collection', title: mixins.$t('collection'), plain: true }
     ],
     contentSaveList: [
       { code: 'receivable', content: 0, type: 'number', title: mixins.$t('saleCollection') },

+ 96 - 62
package-sales/pages/order-billing/order-billing.js

@@ -56,7 +56,7 @@ Page({
         code: 'outStatus',
         pullType: 'mSelect',
         typeName: 'outStatus'
-      }, 
+      },
       {
         code: 'deliveryDate',
         dataType: 'date'
@@ -96,7 +96,7 @@ Page({
           title: ''
         }, {
           name: 'staffName',
-          title:''
+          title: ''
         }],
         title: mixins.$t("storeInformation")
       }
@@ -178,17 +178,17 @@ Page({
       code: 'add',
       title: mixins.$t("add")
     }],
-    contentSaveList: [ {
+    contentSaveList: [{
       type: 'count',
       code: 'count',
       bill: 0,
       quantity: 0
-    },{
+    }, {
       code: 'amount',
       content: 0,
       type: 'number',
       title: mixins.$t("sumTotalAmount")
-    },],
+    }, ],
     primaryKey: 'orderId'
   },
   /**
@@ -205,41 +205,72 @@ Page({
         title: mixins.$t("printedBill")
       }, ] //打印
     } else {
-      // 弹出按钮
-      buttonList = [{
-          name: 'editInto',
-          title: mixins.$t('edit')
-        },
-        {
-          name: 'saleOutBound',
-          title: mixins.$t("saleOutBound"),
-          formMode: Constants.formMode.other,
-          other: {
-            idKey: 'orderId'
-          }
-        }, //出库
-        {
-          name: 'saleOrderReturn',
-          title: mixins.$t("saleReturn"),
-          formMode: Constants.formMode.other,
-          other: {
-            idKey: 'orderId'
-          }
-        }, //退货
-        {
-          name: 'collection',
-          title: mixins.$t("cusCollection"),
-          idKey: 'cusId'
-        }, //跳转客户收款
-        {
-          name: 'invalid',
-          title: mixins.$t("invaidOrder")
-        }, //作废
-        {
-          name: 'printedBill',
-          title: mixins.$t("printedBill")
-        }, //打印
-      ]
+      if (item.outStatus == Constants.outStatus.outBounded) {
+        // 弹出按钮
+        buttonList = [{
+            name: 'editInto',
+            title: mixins.$t('edit')
+          },
+          {
+            name: 'saleOrderReturn',
+            title: mixins.$t("saleReturn"),
+            formMode: Constants.formMode.other,
+            other: {
+              idKey: 'orderId'
+            }
+          }, //退货
+          {
+            name: 'collection',
+            title: mixins.$t("cusCollection"),
+            idKey: 'cusId'
+          }, //跳转客户收款
+          {
+            name: 'invalid',
+            title: mixins.$t("invaidOrder")
+          }, //作废
+          {
+            name: 'printedBill',
+            title: mixins.$t("printedBill")
+          }, //打印
+        ]
+      } else {
+        // 弹出按钮
+        buttonList = [{
+            name: 'editInto',
+            title: mixins.$t('edit')
+          },
+          {
+            name: 'saleOutBound',
+            title: mixins.$t("saleOutBound"),
+            formMode: Constants.formMode.other,
+            other: {
+              idKey: 'orderId'
+            }
+          }, //出库
+          {
+            name: 'saleOrderReturn',
+            title: mixins.$t("saleReturn"),
+            formMode: Constants.formMode.other,
+            other: {
+              idKey: 'orderId'
+            }
+          }, //退货
+          {
+            name: 'collection',
+            title: mixins.$t("cusCollection"),
+            idKey: 'cusId'
+          }, //跳转客户收款
+          {
+            name: 'invalid',
+            title: mixins.$t("invaidOrder")
+          }, //作废
+          {
+            name: 'printedBill',
+            title: mixins.$t("printedBill")
+          }, //打印
+        ]
+      }
+
     }
     this.setData({
       // 弹出按钮
@@ -247,21 +278,24 @@ Page({
     })
   },
 
-    /**
-  * @desc :   跳转客户详情
-  * @date :   2024年5月27日
-  * @author : 姜永辉
-  */
- toTitle(e) {
-  let cusId = e.detail.item.cusId
-  wx.navigateTo({
-    url: this.data.route.detailCustomer.url,
-    success: function (res) {
-      // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
-      res.eventChannel.emit('params', { id: cusId, formMode: Constants.formMode.edit })
-    }
-  })
-},
+  /**
+   * @desc :   跳转客户详情
+   * @date :   2024年5月27日
+   * @author : 姜永辉
+   */
+  toTitle(e) {
+    let cusId = e.detail.item.cusId
+    wx.navigateTo({
+      url: this.data.route.detailCustomer.url,
+      success: function (res) {
+        // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+        res.eventChannel.emit('params', {
+          id: cusId,
+          formMode: Constants.formMode.edit
+        })
+      }
+    })
+  },
   /**
    * @desc :   处理接口返回数据
    * @date : 2024年3月8日
@@ -344,16 +378,16 @@ Page({
    * @author : 于继渤
    */
   onChangeTabs(e) {
-    console.log('onChangeTabs',e);
+    console.log('onChangeTabs', e);
     let index = e.detail.detail.index
     let code = null
-    if(index == 1){
+    if (index == 1) {
       code = ["出库状态-待出库", "出库状态-出库中"]
-    }else if(index == 2){
-      code = [ "出库状态-已出库"]
-    }else if(index == 0){ //全部
-      code = ["出库状态-待出库","出库状态-出库中", "出库状态-已出库"]
-    } 
+    } else if (index == 2) {
+      code = ["出库状态-已出库"]
+    } else if (index == 0) { //全部
+      code = ["出库状态-待出库", "出库状态-出库中", "出库状态-已出库"]
+    }
     this.setData({
       outStatus: code,
     })

+ 1 - 1
package-sales/pages/sales-outbound/sales-outbound.js

@@ -215,7 +215,7 @@ Page({
       },]
     } else {
       //除了已入库 不显示销售退货
-      if (item.outStatus == Constants.outStatus.outBounded) { //"出库状态-已出库"
+      if (item.outStatus == Constants.outStatus.outBoun11ded) { //"出库状态-已出库"
         buttonList = [{
           name: 'editInto',
           title: mixins.$t('edit')