王英杰 1 年之前
父節點
當前提交
b6ab53b549

+ 1 - 0
api/pages/other/company.js

@@ -19,6 +19,7 @@ module.exports = {
         transferHead: 'transfer_head',
         // 功能包的保存
         saveFunc:'save_func',
+        getCurrentDate:'get_current_date',
     },
 
     routeUrl: {

+ 2 - 0
components/dkbase/dk-list/dk-list.js

@@ -362,6 +362,8 @@ Component({
      * @date   : 2024/1/26 11:46
      */
     onCloseSwipe(e) {
+      const { position, instance } = e.detail;
+      instance.close();
       let obj = {
         item: e.currentTarget.dataset.item,
         index: e.currentTarget.dataset.index

+ 4 - 4
components/dkbase/dk-list/dk-list.wxml

@@ -2,8 +2,8 @@
 
 <view wx:for="{{list}}" data-item="{{item}}" wx:key="index" wx:for-index='fIndex' class="{{simpleFlag?'main-simple-class':'main-class' }}">
   <!-- 默认无法停用 -->
-  <van-swipe-cell right-width="{{ 65 }}" disabled="{{swipeDisabled || (defaultFlag &&  item[defaultFlagKey])}}" data-index="{{fIndex}}" data-item="{{item}}" bind:click="onCloseSwipe">
-    <view class="main-foot" style="position: relative;">
+  <van-swipe-cell right-width="{{ 65 }}" disabled="{{swipeDisabled || (defaultFlag &&  item[defaultFlagKey])}}" data-index="{{fIndex}}" data-item="{{item}}"   async-close  bind:close="onCloseSwipe">
+    <view class="main-foot" style="position: relative;">  
       <view class="table-content" catchtap="toDetail" data-item="{{item}}" data-index="{{fIndex}}">
         <!-- 标题行 -->
         <view class="{{simpleFlag?'table-title-simple-row':'table-title-row'}}">
@@ -197,8 +197,8 @@
         </view>
       </view>
     </view>
-    <!-- 侧拉 -->
-    <view style="font-size: 14px;" data-index="{{fIndex}}" data-item="{{item}}" slot="right">{{swipeDeleteFlag?$t['delete']:(item['flgValid'] ? $t['disable'] : $t['enable']) }}</view>
+    <!-- 侧拉  catchtap="onCloseSwipe" -->
+    <view style="font-size: 14px;" data-index="{{fIndex}}" data-item="{{item}}" slot="right" >{{swipeDeleteFlag?$t['delete']:(item['flgValid'] ? $t['disable'] : $t['enable']) }}</view>
   </van-swipe-cell>
 </view>
 

+ 1 - 1
components/dkbase/dk-number-input/dk-number-input.js

@@ -243,7 +243,7 @@ Component({
     */
     handleInput(e) {
       this.triggerEvent('triggerOpen', { 
-      })
+      }) 
       if (this.data.readonly) {
         return
       }

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

@@ -22,6 +22,7 @@
   <!--文本框-->
   <view wx:else>
     <van-field input-align="right" required="{{required}}" label-class="input-title-class" style="--color--:{{titleColor}};--inputColor--:{{inputColor}};--fontSize--:{{fontSize + 'px'}};--width--:{{titleWidth}};--fontWeight--:{{titleFontWeight}};--inputFontWeight--:{{fontWeight}};--height--:{{height}}" value="{{inputValue?inputValue:undefined}}" input-align="{{center}}" label="{{titleValue}}" placeholder="{{placeholder}}" autosize auto-focus clearable border="{{ false }}" input-class="{{inputWidthFlag ? 'dk-cell-value-class-input' : 'dk-cell-value-class'}}" type="text" inputMode="decimal" bind:focus="bindFocus" bind:change="bindInput" bind:blur="bindBlur" >
+      <dk-tip wx:if="{{tip}}" slot="label-icon" style="display: inline-block;" id="{{code}}" Up="{{true}}" Right="{{true}}" tipContent='{{tip}}' bind:clickTip="clickTip"></dk-tip>
     </van-field>
   </view>
 </view>

+ 1 - 1
package-basic-data/pages/product-attribute/product-attribute.js

@@ -85,7 +85,7 @@ Page({
      * @date : 2024/2/1 15:49
      * @author : 于继渤
      */
-  deactivateEnable(e) {
+  deactivateEnable(e) { 
     let item = e.detail.item
     let service = null
     let id = null

+ 121 - 69
package-basic-data/pages/register/company-register/company-register.js

@@ -1,12 +1,12 @@
 /*******************************************************************************
-* Copyright(c) 2022 dongke All rights reserved. / Confidential
-* 类的信息:
-*		1.程序名称:
-*		2.功能描述:注册商户画面
-* 编辑履历:
-*		作者				日期					版本				修改内容
-*		姜永辉		  	2022-11-22			1.00		   	新建
-*******************************************************************************/
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.功能描述:注册商户画面
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		姜永辉		  	2022-11-22			1.00		   	新建
+ *******************************************************************************/
 const mixins = require('@/mixins/index.js')
 const util = require('@/utils/util.js')
 const Constants = require('@/utils/Constants.js');
@@ -39,20 +39,54 @@ Page({
     proFlag: false,
     cardList: ['main'],
     contentObj: {
-      main: [
-        {
-          code: 'gradeCode', type: 'tabs', tagList: [
-            { name: mixins.$t('standardVersion'), id: Constants.gradeCode.STD },
+      main: [{
+          code: 'gradeCode',
+          type: 'tabs',
+          tagList: [{
+              name: mixins.$t('standardVersion'),
+              id: Constants.gradeCode.STD
+            },
             // 专业版暂时注释掉
-            // { name: mixins.$t('professionalVersion'), id: Constants.gradeCode.PRO }
-          ], title: mixins.$t('gradeCode')
+            // {
+            //   name: mixins.$t('professionalVersion'),
+            //   id: Constants.gradeCode.PRO
+            // }
+          ],
+          title: mixins.$t('gradeCode')
+        },
+        {
+          code: 'cpName',
+          type: 'str',
+          required: 'true',
+          title: mixins.$t('cpName')
+        },
+        {
+          code: 'cpManager',
+          type: 'str',
+          required: 'true',
+          title: mixins.$t('cpManager')
+        },
+        {
+          code: 'cpPhone',
+          type: 'phone',
+          required: 'true',
+          title: mixins.$t('cpPhone')
+        },
+        {
+          code: 'cpSize',
+          type: 'str',
+          title: mixins.$t('cpSize')
+        },
+        {
+          code: 'shopSize',
+          type: 'str',
+          title: mixins.$t('shopSize')
+        },
+        {
+          code: 'feedback',
+          type: 'textarea',
+          title: mixins.$t('feedback')
         },
-        { code: 'cpName', type: 'str', required: 'true', title: mixins.$t('cpName') },
-        { code: 'cpManager', type: 'str', required: 'true', title: mixins.$t('cpManager') },
-        { code: 'cpPhone', type: 'phone', required: 'true', title: mixins.$t('cpPhone') },
-        { code: 'cpSize', type: 'str', title: mixins.$t('cpSize') },
-        { code: 'shopSize', type: 'str', title: mixins.$t('shopSize') },
-        { code: 'feedback', type: 'textarea', title: mixins.$t('feedback') },
       ],
     },
   },
@@ -83,17 +117,16 @@ Page({
     })
   },
   /**
- * @desc : 选择活动明细
- * @author : 周兴
- * @date : 2024/4/1
- */
+   * @desc : 选择活动明细
+   * @author : 周兴
+   * @date : 2024/4/1
+   */
   chooseAdItem(e) {
     let item = e.currentTarget.dataset.item;
     let summaryInfo = this.data.summaryInfo
     // 计算截止日期
-    let months = item.validLong + item.extraLong
-    let endDate = app.globalData.company.endDate
-    endDate = new Date(this.data.buyBeginDate).addMonths(months)
+    let months = item.validLong + item.extraLong 
+    let  endDate = new Date(this.data.buyBeginDate).addMonths(months)
     summaryInfo.endDate = endDate.toDateStr();
     this.setData({
       curentAdItem: item,
@@ -103,10 +136,10 @@ Page({
     this.countSummaryAmount(item);
   },
   /**
-     * @desc : 计算金额
-     * @author : 周兴
-     * @date : 2024/4/1
-     */
+   * @desc : 计算金额
+   * @author : 周兴
+   * @date : 2024/4/1
+   */
   countSummaryAmount() {
     let item = this.data.curentAdItem;
     let staffCount = this.data.staffCount;
@@ -194,17 +227,16 @@ Page({
     this.countSummaryAmount();
   },
   /**
-* @desc : 参数设置
-* @date : 2024/2/1 15:49
-* @author : 姜永辉
-*/
+   * @desc : 参数设置
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
   productDetail(e) {
     wx.navigateTo({
       url: this.data.route.productDetail.url,
       events: {
         // 回调后,在这里给页面赋值
-        bandData: function (e) {
-        }
+        bandData: function (e) {}
       },
       success: function (res) {
         // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
@@ -249,10 +281,10 @@ Page({
 
 
   /**
- * @desc   : 处理数据-查询后的逻辑
- * @author : 姜永辉
- * @date   : 2024/1/26 11:46
- */
+   * @desc   : 处理数据-查询后的逻辑
+   * @author : 姜永辉
+   * @date   : 2024/1/26 11:46
+   */
   handleLoadData() {
     let data = {
       cpPhone: app.globalData.phoneNumber
@@ -264,10 +296,10 @@ Page({
   },
 
   /**
-    * @desc : 保存的參數設置
-    * @date : 2024/2/1 15:49
-    * @author : 姜永辉
-    */
+   * @desc : 保存的參數設置
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
   setParams(params) {
     params.cpId = null
     params.owner = app.globalData.user.userId // t_wx_user 表的id
@@ -305,10 +337,10 @@ Page({
   },
 
   /**
-  * @desc : 保存数据服务
-  * @date : 2024/2/1 15:49
-  * @author : 姜永辉
-  */
+   * @desc : 保存数据服务
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
   saveData() {
     // 专业版,成功后需要跳转支付
     if (this.data.proFlag) {
@@ -324,10 +356,10 @@ Page({
   },
 
   /**
-  * @desc : 保存数据服务--校验
-  * @date : 2024/2/1 15:49
-  * @author : 姜永辉
-  */
+   * @desc : 保存数据服务--校验
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
   validData() {
     // if (!this.data.flgPrimary) {
     //   util.showToast('请勾选条款');
@@ -349,10 +381,10 @@ Page({
     return true
   },
   /**
-  * @desc : 用户协议
-  * @date : 2024/7/12 13:48
-  * @author : 刘尧
-  */
+   * @desc : 用户协议
+   * @date : 2024/7/12 13:48
+   * @author : 刘尧
+   */
   openUserAgreement() {
     let url = config.image_url + '/agreement/userAgreement.pdf'
     let toUrl = null;
@@ -390,10 +422,10 @@ Page({
   },
 
   /**
-  * @desc : 隐私协议
-  * @date : 2024/7/11 13:49
-  * @author : 周兴
-  */
+   * @desc : 隐私协议
+   * @date : 2024/7/11 13:49
+   * @author : 周兴
+   */
   openPrivacyAgreement() {
     let url = config.image_url + '/agreement/privacyAgreement.pdf'
 
@@ -431,10 +463,10 @@ Page({
     }
   },
   /**
-  * @desc : 初始化加载
-  * @date : 2024/5/30 15:49
-  * @author : 周兴
-  */
+   * @desc : 初始化加载
+   * @date : 2024/5/30 15:49
+   * @author : 周兴
+   */
   onLoad: function (options) {
     // 从好有分享过来的数据 好友互利共赢  shareType=1 cpid userid startdate enddate   
     if (options.shareType) {
@@ -457,8 +489,28 @@ Page({
 
     // 查询活动
     this.getActivity();
-    this.setData({
-      buyBeginDate: new Date().toDateStr()
-    })
+    // this.setData({
+    //   buyBeginDate: new Date().toDateStr()
+    // }) 
+    this.getCurrentDate()
+  },
+  /**
+   * @desc : 服务器的日期
+   * @author : 姜永辉
+   * @date : 2024/4/1
+   */
+  getCurrentDate() {
+    let _this = this
+    let service = app.globalData['companyService']
+    _this.excute(service, service.getCurrentDate, {}).then(res => {
+      if (res.data.code == Constants.SUCESS_CODE) {
+        //服务器的时间  
+        let nowDate = res.data.data.currentDate
+          nowDate = new Date(nowDate).toDateStr()
+        _this.setData({ 
+          buyBeginDate: nowDate
+        })
+      }
+    });
   },
-})
+})