zhoux 2 жил өмнө
parent
commit
91a9aa4edf

+ 24 - 17
api/pages/core/customer.js

@@ -2,28 +2,35 @@
  * Copyright(c) 2024 dongke All rights reserved. / Confidential
  * 类的信息:
  *		1.程序名称:
- *		2.功能描述:户查询方法
+ *		2.功能描述:户查询方法
  * 编辑履历:
  *		作者				日期					版本				修改内容
  *		周兴		  	2024-1-19       			1.00		       	新建
  *******************************************************************************/
 module.exports = {
-  customerService: {
+    customerService: {
+        // 前缀
+        prefix: '/mdm-server/core/user/',
+        // 更新密码
+        updatePassWord: 'update_password',
+        // 重置密码
+        resetPassword: 'reset_password',
+        // 解锁
+        unLock: 'un_lock',
+    },
 
-  },
-
-  routeUrl: {
-    customer: {
-      // 客户跟进
-      follow: { key: 'follow', url: '/package3/pages/customer-follow-up/add/add', image: '/static/img/customerFollow.png' ,valid:true},
-      // 跟进任务
-      followTask: { key: 'followTask', url: '/package3/pages/follow-up-tasks/follow-up-tasks', image: '/static/img/followTask.png' },
-      // 销售订单
-      order: { key: 'order', url: '/package4/pages/order-billing/choose-goods/choose-goods', image: '/static/img/order.png' ,valid:true},
-      // 客户收款
-      collection: { key: 'collection', url: '/package4/pages/order-billing/customer-collection/add/add', image: '/static/img/receive.png' },
-      // 客户合并
-      merge: { key: 'merge', url: '/package4/pages/order-billing/customer-collection/add/add', image: '/static/img/customerFollow.png' },
+    routeUrl: {
+        customer: {
+            // 客户跟进
+            follow: { key: 'follow', url: '/package3/pages/customer-follow-up/add/add', image: '/static/img/customerFollow.png', valid: true },
+            // 跟进任务
+            followTask: { key: 'followTask', url: '/package3/pages/follow-up-tasks/follow-up-tasks', image: '/static/img/followTask.png' },
+            // 销售订单
+            order: { key: 'order', url: '/package4/pages/order-billing/choose-goods/choose-goods', image: '/static/img/order.png', valid: true },
+            // 客户收款
+            collection: { key: 'collection', url: '/package4/pages/order-billing/customer-collection/add/add', image: '/static/img/receive.png' },
+            // 客户合并
+            merge: { key: 'merge', url: '/package4/pages/order-billing/customer-collection/add/add', image: '/static/img/customerFollow.png' },
+        }
     }
-  }
 };

+ 10 - 10
api/pages/core/user.js

@@ -18,17 +18,17 @@ module.exports = {
         // 解锁
         unLock: 'un_lock',
     },
-    
-    routeUrl : {
+
+    routeUrl: {
         user: {
             // 用name代替url,为了传递params,params和url不能一起使用
             // add: {key: 'add', url: '/pages/index/index2'},
-            edit: {key: 'edit', url: 'user-edit'},
-            resetPassword: {key: 'resetPassword', method: 'resetPassword'},
-            unLock: {key: 'unLock', method: 'unLock'},
-            moduleRights: {key: 'moduleRights', method: 'moduleRights'},
-            enable: {key: 'enable', method: 'enable'},
-            disable: {key: 'disable', method: 'disable'},
-          }
-      }
+            edit: { key: 'edit', url: 'user-edit' },
+            resetPassword: { key: 'resetPassword', method: 'resetPassword' },
+            unLock: { key: 'unLock', method: 'unLock' },
+            moduleRights: { key: 'moduleRights', method: 'moduleRights' },
+            enable: { key: 'enable', method: 'enable' },
+            disable: { key: 'disable', method: 'disable' },
+        }
+    }
 };

+ 7 - 1
app.js

@@ -8,6 +8,7 @@ import './utils/prototype/prototypeDatetime';
 import './mixins/mixins.js';
 import './api/pages/common/common.js';
 import './api/pages/core/user.js';
+import './api/pages/core/customer.js';
 const util = require('./utils/util.js')
 const baseMethod = require('./api/pages/baseMethod.js')
 const baseRoute = require('./api/pages/baseRoute.js')
@@ -26,15 +27,20 @@ function readJsFiles(dirPath) {
   for (let i = 0; i < files.length; i++) {
     const file = files[i];
     // 构建完整路径
-    const fullpath = dirPath + '/' + file;
+    let fullpath =  dirPath + '/' + file;
+
     // 如果是js文件就返回
     if (file.endsWith('.js')) {
+      // fullpath = '@' + fullpath
+      console.log('f1',fullpath);
       let item = require(fullpath);
+      console.log('f2',item);
       if(file != 'baseMethod.js' && file != 'baseRoute.js'){
         item.name = file.replace('.js','');
         returnFiles.push(item);
       }
     }else if(fs.statSync(fullpath).isDirectory()){
+      console.log('b3',fullpath);
       // 如果是文件夹则递归调用自身处理子级文件夹
       let returns = readJsFiles(fullpath);
       returns.forEach(it=>{

+ 2 - 3
package-basic-data/pages/test/test.wxml

@@ -11,11 +11,10 @@
 <van-empty wx:if="{{dataList.length<=0}}" description="暂无数据" />
 
 <!-- 列表区 -->
-<dk-list list="{{dataList}}" titleCorner="salesChannelName" title="customerName" status="displayStatus" subTitle="makeTime" content="{{contentList}}" contentObj="{{contentObj}}" contentCol="displayStatus" footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" bind:toTitle="toTitle" bind:toStatus="toStatus" bind:toPoint="toPoint" routeObjName="{{routeObjName}}" 
-buttonList="{{buttonList}}" bind:open="open"></dk-list>
+<dk-list list="{{dataList}}" titleCorner="salesChannelName" title="customerName" status="displayStatus" subTitle="makeTime" content="{{contentList}}" contentObj="{{contentObj}}" contentCol="displayStatus" footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" bind:toTitle="toTitle" bind:toStatus="toStatus" bind:toPoint="toPoint" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
 
 <van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">到底了~</van-divider>
 <view style="height: 135rpx;"></view>
 
 <!-- 新建按钮 -->
-<dk-save-bottom flagTypeName="customers" submitFlag="{{Customer_Add}}" totallength="{{totallength}}" bind:submit="toAdd" />
+<dk-save-bottom flagTypeName="customers" submitFlag="{{Customer_Add}}" totallength="{{totallength}}" bind:submit="toAdd" />