Selaa lähdekoodia

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

wangyingjie 2 vuotta sitten
vanhempi
commit
c220290e9e

+ 1 - 0
api/pages/ivt/inboundOther.js

@@ -15,6 +15,7 @@ module.exports = {
     otherInboundUpdate: 'inbound_update',
     inBoundHandle: 'inbound_handle',
     inboundRepeal: 'repeal/',
+    selectInbound:'select_inbound',
   },
 
   routeUrl: {

+ 1 - 1
api/pages/mac/cusReceiptPayment.js

@@ -10,7 +10,7 @@
 module.exports = {
 	cusReceiptPaymentService: {
 		// 前缀
-		prefix: 'mdm-server/mac/recPay/',
+		prefix: 'mdm-server/mac/receipt/',
 		insertReceipt:'insert_receipt',
 		selectRpInfoById:'select_rp_info_by_id'
 	},

+ 50 - 0
api/pages/mac/payment.js

@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright(c) 2024 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.功能描述:付款单
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		姜永辉		  	    2024-1-19       		1.00		       	新建
+ *******************************************************************************/
+module.exports = {
+	paymentService: {
+		// 前缀
+		prefix: 'mdm-server/mac/payment/',
+		insertReceivableReceipt: 'insert_receivable_receipt',
+		insertPayableReceipt: 'insert_payable_receipt',
+		insertReceipt: 'insert_receipt',
+		insertRefund: 'insert_refund',
+		invalid: 'invalid/',
+
+	},
+
+	routeUrl: {
+		payment: {			
+			cusReturnCollection: { key: 'cusReturnCollection', method: 'cusReturnCollection' },
+			invaidOrder: { key: 'invaidOrder', method: 'invaidOrder' },
+			editOrder: { key: 'editOrder', method: 'editOrder', primaryKey: 'rpId' },
+			// 收款单新建
+			add: { key: 'add', url: '/package-accounts-manage/pages/receipt/add/add' },
+			// 收款单新建
+			addReturn: { key: 'addReturn', url: '/package-accounts-manage/pages/receipt/add-return/add-return' },
+			// 付款单新建
+			addPay: { key: 'addPay', url: '/package-accounts-manage/pages/payment-order/add/add' },
+			// 付款单新建
+			addReturnPay: { key: 'addReturnPay', url: '/package-accounts-manage/pages/payment-order/add-return/add-return' },
+
+			edit: { key: 'edit', url: '/package-accounts-manage/pages/receipt/detail/detail' },
+			detail: {
+				key: 'detail', url: '/package-purchase/pages/purchase-return/detail/detail'
+			},
+			selectBill: {
+				key: 'selectBill', url: '/package-base-select/pages/select-bill/select-bill'
+			},
+			chooseSupplier: { key: 'chooseSupplier', url: '/package-base-select/pages/select-data/select-data', type: 'supplier' },
+			chooseStaff: { key: 'chooseStaff', url: '/package-base-select/pages/select-data/select-data', type: 'staff' },
+			staffadd: { key: 'staffadd', url: '/package-basic-data/pages/staff/add/add' },
+			chooseOrg: { key: 'chooseOrg', url: '/package-base-select/pages/select-data/select-data', type: 'org' },
+			chooseWh: { key: 'chooseWh', url: '/package-base-select/pages/select-data/select-data', type: 'warehouse' },
+		}
+	}
+}; 

+ 1 - 1
api/pages/mac/receiptPayment.js

@@ -2,7 +2,7 @@
  * Copyright(c) 2024 dongke All rights reserved. / Confidential
  * 类的信息:
  *		1.程序名称:
- *		2.功能描述:收款单
+ *		2.功能描述:收款单
  * 编辑履历:
  *		作者				日期					版本				修改内容
  *		姜永辉		  	    2024-1-19       		1.00		       	新建

+ 2 - 2
app.js

@@ -38,7 +38,7 @@ const purchase = require('./api/pages/pur/purchase.js');
 
 const account = require('./api/pages/mac/account.js');
 const receiptPayment = require('./api/pages/mac/receiptPayment.js');
-
+const payment = require('./api/pages/mac/payment.js');
 const inbound = require('./api/pages/ivt/inbound.js');
 const inboundOther = require('./api/pages/ivt/inboundOther.js');
 const inboundProcessing = require('./api/pages/ivt/inboundProcessing.js');
@@ -70,7 +70,7 @@ const otherReceivable = require('./api/pages/mac/otherReceivable.js');
 const otherPayable = require('./api/pages/mac/otherPayable.js');
 
 // api服务路由文件
-var apiList = [common, oauth,setting, company, wechatPay,user, staff, staffRight, staffPurview, settingValue, customer, role, roleFun, org, roleSensitive, goodsBrand, goodsCategory, goodsSeries, unit, supplier, warehouse, saleChannel, goodsSku, basicData,customerMst,purchase,account,
+var apiList = [common, oauth,setting, company, wechatPay,user, staff, staffRight, staffPurview, settingValue, customer, role, roleFun, org, roleSensitive, goodsBrand, goodsCategory, goodsSeries, unit, supplier, warehouse, saleChannel, goodsSku, basicData,customerMst,purchase,account,payment,
   receiptPayment,inbound,inboundOther,inboundProcessing,inboundPurchaseReturn,outbound,outboundOther,outboundProcessing,outboundSaleReturn,inventory,moneyAccount,intoReturn,intoReturnItem,cusFollow,order,transfer,saleOutBound,inboundReturn,cusReceiptPayment,menuFrequency,userMenuFrequency,comMenu,saleOutBoundReturn,advertisement,check,freeze,otherReceivable,otherPayable]
 
 const util = require('./utils/util.js')

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

@@ -125,7 +125,7 @@
 
         <view class="amount-item-class">
           <!--条数-->
-          <dk-cell titleColor="#95A8CB;" title="{{$t['together'] + (form[itemName]?form[itemName].length:0) + $t['bill']}}" amount="{{false}}"></dk-cell>
+          <dk-cell titleColor="#95A8CB;" title="{{$t['together'] + (form[itemName]?form[itemName].length:0) + $t['piece']}}" amount="{{false}}"></dk-cell>
           <!--标价折扣-->
           <dk-cell wx:if="{{sumAmountColFlag}}" fontSize="16" fontWeight="bold" contentColor="#CAA977" titleColor="#1B365D;" title="合计金额" content="{{card[sumAmountCol]?card[sumAmountCol]:0}}"></dk-cell>
         </view>

+ 24 - 24
components/dkbase/dk-form-more-items/dk-form-more-items.js

@@ -9,6 +9,7 @@
  *******************************************************************************/
 const common = require('@/utils/common');
 const Constants = require('@/utils/Constants');
+const config = require('@/config/config.js')
 const chooseLocation = requirePlugin('chooseLocation');
 const util = require('@/utils/util.js')
 const app = getApp();
@@ -130,6 +131,7 @@ Component({
    * 组件的初始数据
    */
   data: {
+    maxSize: Constants.uploadFileConfig.maxSize,
     // 是否显示pop
     show: false,
     showDate: false,
@@ -177,7 +179,8 @@ Component({
      * @date : 2024/2/19 12:16
      */
     show: function () {
-      const location = chooseLocation.getLocation(); 
+      const location = chooseLocation.getLocation();
+      // console.log('loc', location);
       let form = this.data.form
       if (location) {
         form['address'] = location;
@@ -208,10 +211,6 @@ Component({
     * @date : 2024/2/22 18:16
     */
     choose(e) {
-        // 只读
-        if (this.data.readonly) {
-          return;
-        }
       let item = e.currentTarget.dataset;
       let cardIndex = e.currentTarget.dataset.index
       let cardList = this.data.cardList
@@ -233,13 +232,6 @@ Component({
                 // that.setData({
                 //   form: form
                 // })
-                let form = that.data.form
-                console.log('fff1',form);
-                form[that.data.itemName] = util.filterArrayEmpty(form[that.data.itemName])
-                console.log('fff2',util.filterArrayEmpty(form[that.data.itemName]));
-                that.setData({
-                  form:form
-                })
                 that.triggerEvent("chooseData", { code: cardList[cardIndex].name, data: data, index: item.index })
                 // // 如果需要联动控制选商品按钮
                 // if (item.item.controlChooseFlag) {
@@ -255,7 +247,7 @@ Component({
             success: function (res) {
               // 通过eventChannel向被打开页面传送数据
               let item = {}
-              let form = that.data.form 
+              let form = that.data.form
               item[that.data.objIdCol] = form[that.data.objIdCol]
               if (form && form[that.data.itemName]) {
                 item.data = util.filterArrayEmpty(form[that.data.itemName])
@@ -349,13 +341,15 @@ Component({
           url: '/package-base-select/pages/select-customers/select-customers',
           events: {
             // 回调后
-            bindData: function (data) { 
+            bindData: function (data) {
+              console.log('rr', data);
               let form = _this.data.form
-              let objIdCol = _this.data.objIdCol; 
+              let objIdCol = _this.data.objIdCol;
               // 赋值对象Id
               if (objIdCol && data[objIdCol]) {
                 form[objIdCol] = data[objIdCol]
-              } 
+              }
+              console.log('ddd', form);
               form.objInfo = data;
               _this.setData({
                 form: form,
@@ -379,7 +373,7 @@ Component({
             bindData: function (data) {
               let dataitem = data.data.item
               let form = _this.data.form
-              let objIdCol = _this.data.objIdCol; 
+              let objIdCol = _this.data.objIdCol;
               // 赋值对象Id
               if (objIdCol && dataitem[objIdCol]) {
                 form[objIdCol] = dataitem[objIdCol]
@@ -394,8 +388,9 @@ Component({
           },
           success: function (res) {
             // 通过eventChannel向被打开页面传送数据
-            let item = {} 
-            let route = _this.data.routeUrl[_this.data.routeObjName]; 
+            let item = {}
+            console.log('re', _this.data.routeObjName, _this.data.routeUrl);
+            let route = _this.data.routeUrl[_this.data.routeObjName];
             res.eventChannel.emit('params', { item: item, route: route['chooseSupplier'] })
           }
         })
@@ -559,7 +554,8 @@ Component({
                   }
                   that.setData({
                     form: form
-                  }) 
+                  })
+                  console.log('form', form)
                   that.triggerEvent("chooseData", { code: item.key, data: data, index: item.index })
                   // 如果需要联动控制选商品按钮
                   if (item.item.controlChooseFlag) {
@@ -608,7 +604,8 @@ Component({
               let title = this.$t(item.title ? item.title : item.code)
               // 如果必须输入,就要进行判断
               if (item.required && form[this.data.itemName] && form[this.data.itemName].length > 0) {
-                form[this.data.itemName].forEach(t => { 
+                form[this.data.itemName].forEach(t => {
+                  console.log('tt', t, item.code);
                   if (!t[item.code]) {
                     t[item.code + '_errMsg'] = title + '不为空'
                     flag = false;
@@ -709,7 +706,8 @@ Component({
               _this.setData({
                 form: form,
                 value: JSON.stringify(form)
-              }) 
+              })
+              console.log('ff', _this.data.form);
             }
           },
         })
@@ -800,7 +798,8 @@ Component({
         value: JSON.stringify(form),
         form: form,
         contentObj: contentObj
-      }) 
+      })
+      console.log("changeNumber组件", form);
       this.triggerEvent("changeNumber", { code: key, data: e.detail.value })
     },
     /**
@@ -890,7 +889,8 @@ Component({
  * @author : 周兴
  * @date   : 2024/1/26 11:46
  */
-    onChange(e) { 
+    onChange(e) {
+      console.log("onChange", e);
       // 只读
       if (this.data.readonly) {
         return;

+ 71 - 6
components/dkbase/dk-form/dk-form.js

@@ -11,6 +11,7 @@ const common = require('@/utils/common');
 const Constants = require('@/utils/Constants');
 const util = require('@/utils/util.js')
 const chooseLocation = requirePlugin('chooseLocation');
+const config = require('@/config/config.js')
 const app = getApp();
 Component({
   /**
@@ -22,6 +23,10 @@ Component({
       type: Array,
       value: []
     },
+    // 表名,用于上传附件
+    table: {
+      type: String,
+    },
     // 内容
     contentObj: {
       type: Object,
@@ -68,6 +73,7 @@ Component({
     // 根据值控制组件的显示隐藏
     changeObj: null,
     form: {},
+    maxSize: Constants.uploadFileConfig.maxSize,
     checked: false
   },
   lifetimes: {
@@ -145,8 +151,8 @@ Component({
         })
       } else if (item.item.type == 'choose') {
         let that = this
-        console.log(item,this.data.routeObjName,this.data.routeUrl
-          );
+        console.log(item, this.data.routeObjName, this.data.routeUrl
+        );
         // 跳转链接
         if (item.item.urlKey) {
           let route = this.data.routeUrl[this.data.routeObjName][item.item.urlKey]
@@ -164,10 +170,10 @@ Component({
               },
               success: function (res) {
                 console.log('item', that.data.form)
-                let data = { 
-                  route: route, 
-                  formMode: item.item.formMode ,
-                  id:that.data.form[item.item.idKey],
+                let data = {
+                  route: route,
+                  formMode: item.item.formMode,
+                  id: that.data.form[item.item.idKey],
                   chooseType: item.item.chooseType
                 }
                 // 通过eventChannel向被打开页面传送数据
@@ -466,6 +472,7 @@ Component({
           errMsg: errMsg
         })
       }
+      this.triggerEvent('changePhoneblur', e)
     },
     /**
      * @desc : 小程序地图调用
@@ -589,6 +596,64 @@ Component({
       })
     },
     /**
+  * @desc : 上传附件超出大小
+  * @author : 周兴
+  * @date : 2024/3/27 16:16
+  */
+    overSize(e) {
+      util.showToast('文件超出' + Constants.uploadFileConfig.maxSizeMB);
+    },
+    /**
+     * @desc : 上传附件
+     * @author : 周兴
+     * @date : 2024/3/27 16:16
+     */
+    afterRead(e) {
+      // this.setData({
+      //     uploadFileFlag:true
+      // })
+      const _this = this;
+      const {
+        file
+      } = e.detail;
+      // 配置存放的文件夹 公司code - 表名 - 年月 -- 日
+      let folder = app.globalData.company.cpCode + '/' + this.data.table + '/' + new Date().toYearMonth2() + '/' + new Date().toDay()
+      let url = config.upload_url;
+      url = url.replace('mdm-server', 'mdm-server' + '-' + app.globalData.company.svcCode.replace('_', '-'))
+      file.forEach(res => {
+        // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
+        wx.uploadFile({
+          url: url,
+          filePath: res.path,
+          name: 'file',
+          formData: {
+            'folder': folder
+          },
+          header: {
+            'Authorization': 'Bearer ' + app.globalData.token
+          },
+          success(res) {
+            let data = JSON.parse(res.data)
+            if (data.code === 200) {
+              _this.setData({
+                uploadFileFlag: false
+              })
+              let form = _this.data.form
+              let annexPaths = form['annexPaths'] || []
+              data.data.url = config.image_url + data.data.path
+              annexPaths.push(data.data)
+              form.annexPaths = annexPaths;
+              _this.setData({
+                form: form,
+                value: JSON.stringify(form)
+              })
+              console.log('ff', _this.data.form);
+            }
+          },
+        })
+      })
+    },
+    /**
      * @desc : 获取语言的方法
      * @author : 周兴
      * @date : 2024/1/19

+ 7 - 7
components/dkbase/dk-form/dk-form.wxml

@@ -78,14 +78,14 @@
       </van-field>
       <!--附件-->
       <view style="display:flex;width:100%;margin: 1vw; padding-top: 20rpx;" wx:if="{{item.type=='uploader'}}">
-        <view style="width: 168rpx; flex:1;color: #95A8CB;font-size: 28rpx;padding-left: 27rpx;">附件</view>
-        <view style="width: calc(100% - 168rpx);text-align: left;">
-          <van-uploader max-count="5" accept="image" style="margin-left: 4%;border-radius: 15rpx;" preview-size="160rpx;" file-list="{{ fileList }}" bind:delete="deleteImg" bind:after-read="afterRead" multiple="true" imageFit="aspectFit" />
-          <view style="margin-left: 27rpx;color: #C8C9CC;font-size: 12px;">
-            图片最多上传5张
+            <view style="width: 168rpx; flex:1;color: #95A8CB;font-size: 28rpx;padding-left: 27rpx;">附件</view>
+            <view style="width: calc(100% - 168rpx);text-align: left;">
+              <van-uploader max-count="5" disabled="{{!!item.readonly}}" accept="image" style="margin-left: 4%;border-radius: 15rpx;" preview-size="160rpx;" file-list="{{ form['annexPaths'] }}" bind:delete="deleteImg" bind:after-read="afterRead" multiple="true" imageFit="aspectFit" max-size="{{maxSize}}" bind:oversize="overSize" />
+              <view style="margin-left: 27rpx;color: #C8C9CC;font-size: 12px;">
+                图片最多上传5张
+              </view>
+            </view>
           </view>
-        </view>
-      </view>
     </view>
   </view>
 </view>

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

@@ -142,12 +142,12 @@ Component({
           id: '入库类型-采购入库',
           infotype: 'default'
         },
-        
         {
-          name: '采退入库',
-          id: '入库类型-采退入库',
+          name: '销退出库',
+          id: '出库类型-销退出库',
           infotype: 'default'
         },
+        
         {
           name: '其他入库',
           id: '入库类型-其他入库',
@@ -225,8 +225,8 @@ Component({
         },
         
         {
-          name: '销退出库',
-          id: '出库类型-销退出库',
+          name: '采退入库',
+          id: '入库类型-采退入库',
           infotype: 'default'
         },
         {

+ 1 - 0
i18n/zh-CN.js

@@ -35,6 +35,7 @@ const button = {
   goodsDetail: '商品明细',
   otherInfo: '其他信息',
   responsiblePerson: '责任人',
+  invalidSuccessfully: '作废成功',
 }
 
 // 资金

+ 2 - 2
package-accounts-manage/pages/payment-order/add/add.js

@@ -78,7 +78,7 @@ Page({
       type: 'number'
     }],
     btnFormData: null,
-    routeObjName: 'receiptPayment',
+    routeObjName: 'payment',
     accountService: app.globalData['accountService'],
     payableResidue: 0,
     paymentResidue: 0,
@@ -153,7 +153,7 @@ Page({
       _this.setForm(formData, contentObj, objInfo.payableResidue,
         objInfo.paymentResidue, res.data.data)
       _this.setData({
-        payableList: data.payableList,
+        payableList: res.data.data,
         objInfo,
         payableResidue: objInfo.payableResidue,
         paymentResidue: objInfo.paymentResidue,

+ 1 - 1
package-accounts-manage/pages/payment-order/payment-order.js

@@ -98,7 +98,7 @@ Page({
     ],
     btnFormData: null,
     // 路由
-    routeObjName: 'receiptPayment',
+    routeObjName: 'payment',
     // 主键Id
     primaryKey: 'rpId',
 

+ 1 - 0
package-base-select/pages/select-goods/select-goods.js

@@ -168,6 +168,7 @@ Page({
     console.log('openAddItemInfo',e)
     let item = e.currentTarget.dataset.item
     item.itemQty = 1   //打开 popur 数量默认为1
+    item.nonStdCode = "-"
     if (this.data.item == Constants.billType.saleOut) { //跟进仓库批次号cpid 查询库存
       console.log('globalData', app.globalData)
       this.getInventory(

+ 94 - 32
package-basic-data/pages/customer-reception/add/add.js

@@ -20,54 +20,114 @@ Page({
     radioFollowUp: '1',
     routeObjName: 'cusFollow',
     cardList: ['main'],
-    buttonSaveList:[{code:'add',title:mixins.$t('save'),width:'120rpx'}],
+    buttonSaveList: [{ code: 'add', title: mixins.$t('save'), width: '120rpx' }],
     contentObj: {
       main: [
         { code: 'cusName', type: 'str', required: true, title: mixins.$t('customerName') },
-        { code: 'cusPhone', type: 'phone', title: mixins.$t('cusPhone') , required: true },
-        { code: 'addressFull', type: 'address', title: mixins.$t('addressFull') , required: false },
-        { code: 'addressNo', type: 'str', required: false, title: mixins.$t('addressNo')  },
-        { code: 'intention', name: 'intentionName', type: 'drop', required: true, dropType: 'customerIntention', title:  mixins.$t('intention')  },
-        { code: 'remarks', type: 'textarea', rows: '5', required: true, showWordLimit: true, title: mixins.$t('followData')  },
+        { code: 'cusPhone', type: 'phone', title: mixins.$t('cusPhone'), required: true },
+        { code: 'addressFull', type: 'address', title: mixins.$t('addressFull'), required: false },
+        { code: 'addressNo', type: 'str', required: false, title: mixins.$t('addressNo') },
+        { code: 'intention', name: 'intentionName', type: 'drop', required: true, dropType: 'customerIntention', title: mixins.$t('intention') },
+        { code: 'remarks', type: 'textarea', rows: '5', required: true, showWordLimit: true, title: mixins.$t('followData') },
         { code: 'nextFollowTime', type: 'dateTime', required: true, title: mixins.$t('nextFollowTime') },
-        { code: 'stayTimeLen', name: 'stayTimeLenName', required: true, title: mixins.$t('stayTimeLen') , dropType: 'storeRetentionTime', type: 'drop', }
+        { code: 'stayTimeLen', name: 'stayTimeLenName', required: true, title: mixins.$t('stayTimeLen'), dropType: 'storeRetentionTime', type: 'drop', },
+        { code: 'file', type: 'uploader', title: mixins.$t("uploader") }
       ]
     },
-
-    followStatus:mixins.$t('followStatusReporting')
+    table: Constants.tables.cusFollow,
+    customerService: app.globalData['customerService'],
+    followStatus: mixins.$t('followStatusReporting')
   },
 
 
- /**
-  * @desc : 设置保存参数
-  * @date : 2024/2/1 15:49
-  * @author : 于继渤
-  */
- setParams(params) {
-  params.followStatus = this.data.followStatus
-  params.followOrg =  app.globalData.user.orgId
-  return params
-},
-/**
- * @desc : 保存数据服务
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
-saveData() {
+  /**
+   * @desc : 设置保存参数
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  setParams(params) {
+    params.followStatus = this.data.followStatus
+    params.followOrg = app.globalData.user.orgId
+    return params
+  },
+  /**
+   * @desc : 保存数据服务
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  saveData() {
     return this.excute(this.data.service, this.data.service.insert, this.data.params);
-},
-
-
+  },
+  /**
+   * @desc : 手机号离开焦点事件
+   * @date : 2024/4/8 15:49
+   * @author : 于继渤
+   */
+  changePhoneblur(e) {
+    let phone = e.detail.detail.detail.value
+    if (phone) {
+      //查询客户信息
+      this.getCustomerData({ cusPhone: phone })
+    }
+  },
 
+  /**
+   * @desc : 查询客户信息
+   * @author : 于继渤
+   * @date : 2024/1/23 9:16
+   */
+  getCustomerData(params) {
+    return this.excute(this.data.customerService, this.data.customerService.selectByCondNoPage, params).then(res => {
+      if (res.data.code == 200) {
+        if (res.data.data.length > 0) {
+          let formData = JSON.parse(this.data.formData)
+          let item = res.data.data[0]
+          formData.cusCode = item.cusCode
+          formData.cusId = item.cusId
+          formData.cusName = item.cusName
+          formData.cusFromName = item.cusFromName
+          //处理地址
+          formData.address = {
+            address: item.addressFull,
+            addressFull: item.addressFull,
+            addressArea: item.addressArea,
+            addressGcj02: item.addressGcj02,
+            addressName: item.addressName,
+          }
+          formData.addressArea = item.addressArea
+          formData.addressFull = item.addressFull
+          formData.addressGcj02 = item.addressGcj02
+          formData.addressName = item.addressName
+          formData.addressNo = item.addressNo
+          this.setData({
+            formData: JSON.stringify(formData)
+          })
+        }
+      }
+    });
+  },
+  /**
+    * @desc : 顶部切换
+    * @date : 2024/4/8 15:49
+    * @author : 于继渤
+    */
   onRadioFollowUp(e) {
     let detail = e.detail
     this.setFormContent(detail)
     this.setData({
       radioFollowUp: detail,
-      formData:null
+      formData: null
     })
     console.log('onRadioFollowUp', e.detail)
   },
+  /**
+  * @desc : 跳转购物车
+  * @date : 2024/2/1 15:49
+  * @author : 于继渤
+  */
+  toShopping(){
+
+  },
 
   /**
   * @desc : 设置跟进form 字段
@@ -83,12 +143,14 @@ saveData() {
       { code: 'intention', name: 'intentionName', type: 'drop', required: true, dropType: 'customerIntention', title: mixins.$t('intention') },
       { code: 'remarks', type: 'textarea', rows: '5', required: true, showWordLimit: true, title: mixins.$t('followData') },
       { code: 'nextFollowTime', type: 'dateTime', required: true, title: mixins.$t('nextFollowTime') },
-      { code: 'stayTimeLen', name: 'stayTimeLenName', required: true, title: mixins.$t('stayTimeLen'), dropType: 'storeRetentionTime', type: 'drop', }
+      { code: 'stayTimeLen', name: 'stayTimeLenName', required: true, title: mixins.$t('stayTimeLen'), dropType: 'storeRetentionTime', type: 'drop', },
+      { code: 'file', type: 'uploader', title: mixins.$t("uploader") }
     ]
     let radioFollowUpTwolist = [
       { code: 'intention', name: 'intentionName', type: 'drop', required: true, dropType: 'customerIntention', title: mixins.$t('intention') },
       { code: 'remarks', type: 'textarea', rows: '5', required: true, showWordLimit: true, title: mixins.$t('followData') },
-      { code: 'stayTimeLen', name: 'stayTimeLenName', required: true, title: mixins.$t('stayTimeLen'), dropType: 'storeRetentionTime', type: 'drop', }
+      { code: 'stayTimeLen', name: 'stayTimeLenName', required: true, title: mixins.$t('stayTimeLen'), dropType: 'storeRetentionTime', type: 'drop', },
+      { code: 'file', type: 'uploader', title: mixins.$t("uploader") }
     ]
 
     let contentObj = this.data.contentObj
@@ -103,7 +165,7 @@ saveData() {
     }
 
     this.setData({
-      followStatus,followStatus,
+      followStatus, followStatus,
       contentObj: contentObj
     })
   }

+ 6 - 4
package-basic-data/pages/customer-reception/add/add.wxml

@@ -25,14 +25,16 @@
 </view>
 
 
-<dk-form id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" bind:chooseData="chooseData">
+<dk-form id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" bind:changePhoneblur="changePhoneblur" bind:chooseData="chooseData" table="{{table}}">
 </dk-form>
 
+<view style="height: 200rpx;"></view>
 <!-- 购物车 -->
-<view catchtap="toPay" data-item="{{form}}" style="position:fixed;z-index: 10;bottom: 250rpx;right: 50rpx;">
-  <image style="height:51px;width: 51px;" src="/static/image/Group.png" />
+<view style="position: fixed;bottom: 230rpx;right: 30rpx;">
+  <view bind:tap="toShopping" class="btn-add-class">
+    <van-icon name="cart-o" color="#FFFFFF" size="60rpx" />
+  </view>
 </view>
 
-
 <!--  保存 -->
 <dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="save"></dk-save-button>

+ 9 - 0
package-basic-data/pages/customer-reception/add/add.wxss

@@ -15,4 +15,13 @@
   background:white;
    padding-left: 7vw;
    border-radius: 15rpx;
+}
+.btn-add-class {
+	background: #1B365D;
+	border-radius: 50%;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	padding: 20rpx;
+	box-shadow: 0px 17px 22px 0px #1B365D33;
 }

+ 2 - 9
package-basic-data/pages/role/add/add.js

@@ -55,14 +55,7 @@ Page({
   },
 
 
-  /**
-    * @desc   : 处理数据
-    * @author : 于继渤
-    * @date   : 2024/1/26 11:46
-    */
-  handleData(data) {
-    
-  },
+
 
 
 
@@ -85,12 +78,12 @@ Page({
   */
   saveData() {
     if (this.data.formMode == Constants.formMode.edit && this.data.formType !== Constants.formMode.add) {
-
       return this.excute(this.data.service, this.data.service.update, this.data.params);
     } else {
       let params = this.data.params
       params.roleId = null
       params.roleCode = null
+      params.flgValid = true
       return this.excute(this.data.service, this.data.service.insert, params);
     }
 

+ 15 - 13
package-basic-data/pages/role/role.js

@@ -18,6 +18,14 @@ Page({
     ],
     buttonSaveList:[{code:'add',title:'新建角色',width:'120rpx',color:'#1B365D'}],
     contentSaveList:[],
+      // 查询条件
+      searchContent: [{
+        code: 'flgValid', title: mixins.$t('allValidInvalid'), searchType: Constants.searchType.switch,
+  
+        list: [
+          { code: 1, title: mixins.$t('valid'), value: true },
+          { code: 2, title: mixins.$t('invalid'), value: false }]
+      }],
     // 路由
     routeObjName: 'role',
     tableData: [],
@@ -29,19 +37,7 @@ Page({
     * @author : 于继渤
     */
   deactivateEnable(e) {
-    let item = e.detail.item
-    let method = item.flgValid ? this.data.service.disable : this.data.service.enable;
-    return this.excute(this.data.service, method, item.roleId).then(res => {
-      if (res.data.code == 200) {
-        wx.showToast({
-          title: '操作成功',
-          image: '/static/image/success.png',
-          duration: 1000
-        })
-        //查询列表
-        this.searchData()
-      }
-    });
+    this.handleMoreDataIsValid(this.data.service, e.detail.item, 'roleId')
   },
 
   /**
@@ -123,6 +119,12 @@ Page({
   },
   onShow(){
     if(this.data.refreshDataFlag){
+      this.setData({
+        pageInfo:{
+          currentPage:1,
+          pageSize:5
+        }
+      })
       this.searchData()
     }
   }

+ 3 - 3
package-inventory/pages/other-warehousing/other-warehousing.js

@@ -63,8 +63,7 @@ Page({
             title: mixins.$t('goodsBatch'),
             type: 'str',
         },
-        ],
-
+        ], 
         cardList: [{
             name: 'main',
             title: mixins.$t('inBoundInfo'),
@@ -75,7 +74,8 @@ Page({
             info: '(' + mixins.$t('warehousingProcessing') + ')',
             color: '#E4002B',
             itemAmt: 0,
-            displayNum: 2
+            content:2,
+            displayNum: 1
         }, {
             name: 'other',
             title: mixins.$t('otherInfo')

+ 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="skuCode" descCol="skuModel" priceCol="pricePur" quantityCol="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="skuCode" subCol="skuCode" descCol="skuModel" priceCol="pricePur" quantityCol="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>

+ 6 - 10
package-inventory/pages/warehousing-processing/warehousing-processing.js

@@ -94,14 +94,14 @@ Page({
         name: 'intoDate',
         title: mixins.$t('intoDate')
       }],
-      '采退入库': [{
+      '销退出库': [{
         name: 'intoNo',
         title: mixins.$t('orderNo')
       }, {
         name: 'cusPhone',
         title: mixins.$t('cusPhone')
       }, {
-        name: 'returnAddress',
+        name: 'addressFull',
         title: mixins.$t('addressFull')
       }, {
         name: [{
@@ -222,16 +222,12 @@ Page({
     if (this.data.active == 0) {
       //待入库的查询参数
       params.intoStatus = Constants.intoStatus.inBounding
+      params.outStatus = Constants.outStatus.outBounding
     }
-    if (this.data.active == 1) {
-      if (params.intoTypeList == null || params.intoTypeList.length == 0) {
-        params.intoTypeList = [
-          Constants.intoType.pur,
-          Constants.intoType.other,
-          Constants.intoType.saleReturn]
-      }
+    if (this.data.active == 1) {       
       //已入库的查询参数 
       params.intoStatus = Constants.intoStatus.inBounded
+      params.outStatus = Constants.outStatus.outBounded
     }
     params.intoTypes = params.intoTypeList
 
@@ -243,7 +239,7 @@ Page({
    * @author : 姜永辉
    */
   getData(params) {
-    return this.excute(this.data.service, this.data.service.selectByCond, params);
+    return this.excute(this.data.inboundOtherService, this.data.inboundOtherService.selectInbound, params);
   },
   /**
    * @desc : 处理接口返回数据

+ 85 - 51
package-sales/pages/order-billing/order-billing.js

@@ -16,45 +16,14 @@ Page({
    * 页面的初始数据 
    */
   data: {
+    tagList: [{ title: "全部", code: '' }, { title: "待出库", code: ['出库状态-待出库', '出库状态-出库中'] }, { title: "已出库", code: ['出库状态-已出库'] }],
     routeObjName: 'order',
     // 查询条件
     searchContent: [
       { code: 'createtime', title: mixins.$t("pastThirthtyDays"), defaultValue: 5, searchType: Constants.searchType.date },
       { code: 'staff', title: mixins.$t("staffId"), dropType: 'staff' },
       {
-        code: 'orderStatus', title: '审批状态', searchType: Constants.searchType.switch,
-        list: [
-          {
-            checked: true,
-            text: "异常",
-            value: "审-异常"
-          },
-          {
-            checked: true,
-            text: "待审",
-            value: "审-待审"
-          },
-          {
-            checked: true,
-            text: "审批中",
-            value: "审-审中"
-          },
-          {
-            checked: true,
-            text: "通过",
-            value: "审-通过"
-          },
-          {
-            checked: true,
-            text: "拒绝",
-            value: "审-拒绝"
-          },
-          {
-            checked: false,
-            text: "冲正",
-            value: "订单状态-冲正"
-          }
-        ]
+        code: 'orderStatus', title: '审批状态', searchType: Constants.searchType.switch
       },
       {
         code: 'choose', title: mixins.$t("choose"), searchType: Constants.searchType.pick
@@ -118,35 +87,34 @@ Page({
         title: mixins.$t("adddressFull")
       }]
     },
-
     // 弹出按钮
     buttonList: [
-
-      {
-        name: 'saleOutBound', title: mixins.$t("saleOutBound"), formMode: Constants.formMode.other, other: { idKey: 'orderId' },
-      },
+      { 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") },
-      { name: 'merge', title: mixins.$t("printedBill") },
-      { name: 'cancel', title: mixins.$t("invaidOrder") }
+        }
+      },//退货
+      { name: 'collection', title: mixins.$t("cusCollection") },//收款
+      { name: 'merge', title: mixins.$t("printedBill") }, //打印
+      { name: 'invalid', title: mixins.$t("invaidOrder") } //作废
     ],
-
     buttonSaveList: [{ code: 'add', title: mixins.$t("add") }],
-    contentSaveList: [{ code: 'need', title: mixins.$t("totalAmount"), type: 'str' }, { code: 'amount', content: 2000, type: 'number' }]
+    contentSaveList: [{ code: 'need', title: mixins.$t("totalAmount"), type: 'str' }, { code: 'amount', content: 0, type: 'number' }, {
+      type: 'count',
+      code: 'count',
+      bill: 0,
+      quantity: 0
+    }],
+    outStatus: []
 
   },
-  //statusName
   /**
   * @desc :   处理接口返回数据
   * @date : 2024年3月8日
-  * @author : 王英杰
+  * @author : 于继渤
   */
   handleSearchData(tableData) {
-
     tableData.forEach(res => {
       if (res.outStatus !== Constants.outStatus.unOutBound) { //处理状态
         res.statusName = res.outStatusName
@@ -158,10 +126,53 @@ Page({
     this.setData({
       tableData: tableData
     })
+    //计算底部金额
+    this.calculateTotalAmount()
   },
-  // CalculateTotalAmount
-  invalid(){
-    console.log('invalid')
+
+  /**
+  * @desc :   作废
+  * @date : 2024年3月8日
+  * @author : 于继渤
+  */
+  invalid(e) {
+    return this.excute(this.data.service, this.data.service.invalid + '/' + e.orderId, {}).then(res => {
+      if (res.data.code == 200) {
+        wx.showToast({
+          title: mixins.$t('invalidSuccessfully'),
+          image: '/static/image/success.png',
+          duration: 1000
+        })
+      }
+    })
+  },
+
+
+  /**
+ * @desc : 切换
+ * @date : 2024/2/1 15:49
+ * @author : 于继渤
+ */
+  onChangeTabs(e) {
+    let code = e.detail.detail.code
+    this.setData({
+      outStatus: code,
+      pageInfo: {
+        currentPage: 1,
+        pageSize: 5
+      }
+    })
+    this.searchData()
+  },
+  /**
+* @desc : 设置查询参数
+* @date : 2024/2/1 15:49
+* @author : 于继渤
+*/
+  setSearchParams(params) {
+    //销售状态
+    params.outStatusList = this.data.outStatus == 'all' ? [] : this.data.outStatus
+    return params
   },
   /**
      * @desc : 加载数据
@@ -173,6 +184,29 @@ Page({
   },
 
   /**
+  * @desc :   计算底部合计金额等
+  * @date : 2024年4月8日
+  * @author : 于继渤
+  */
+  calculateTotalAmount() {
+    let tableData = this.data.tableData
+    let contentSaveList = this.data.contentSaveList
+    let sumAmount = Number(0)
+    let sumQuantity = Number(0)
+    tableData.forEach(res => {
+      sumAmount += res.sumAmount
+      sumQuantity += res.sumQuantity
+    })
+    contentSaveList[1].content = sumAmount
+    contentSaveList[2].bill = tableData.length
+    contentSaveList[2].quantity = sumQuantity
+    this.setData({
+      contentSaveList: contentSaveList
+    })
+
+  },
+
+  /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {

+ 2 - 1
package-sales/pages/order-billing/order-billing.wxml

@@ -1,12 +1,13 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
-<loading wx:if="{{loading}}"  loadingName="{{$t['loading']}}"  backgroundColor="#f2f2f2;" opacity="0.8"></loading>
+<loading wx:if="{{loading}}" loadingName="{{$t['loading']}}" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
 <van-sticky scroll-top="0">
   <!-- 查询条件 -->
 
 
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['customerName','orderNo','telephone','adddress','contractNumber'])}}">
   </dk-dropdown-menu>
+  <dk-tabs active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs"></dk-tabs>
 </van-sticky>
 
 

+ 0 - 8
package-sales/pages/order-return/add/add.js

@@ -145,15 +145,7 @@ Page({
     //选择源单
     if (code == 'fromNo') {
       if (item.itemList && item.itemList.length > 0) {
-        //处理商品明细
-        // item.itemList.forEach(res => {
-        //   res.priceOut = res.sale
-        // })
         formData.goodsList = item.itemList
-
-
-
-
         formData.fromNo = item.fromNo
         this.calculateAmount(formData)
       }

+ 1 - 0
utils/Constants.js

@@ -315,6 +315,7 @@ module.exports = {
     income: 't_mac_other_receivable',
     // 其他支出单
     outlay: 't_mac_other_payable',
+    cusFollow: 't_crm_cus_follow',
   },
 
   /**