Răsfoiți Sursa

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

zhoux 2 ani în urmă
părinte
comite
5e91d754a6

+ 1 - 1
components/dkbase/dk-save-button/dk-save-button.wxml

@@ -26,7 +26,7 @@
     <!-- 保存确定区域 -->
     <view style="display: flex;width: {{contentList && contentList.length > 0?'50%':'100%'}};justify-content: {{btnRightFlag?'flex-end':'left'}};">
       <view class="btn-class" style="margin-right: {{btnAutoWidthFlag?'20rpx':''}};  width:{{btnAutoWidthFlag?(100/buttonList.length + '%'): (item.width?item.width:'196rpx')}}" wx:for="{{buttonList}}" wx:for-item="item" data-item="{{item}}" wx:key="index">
-        <van-button round size="large" data-item="{{item}}" color="{{item.color?item.color:'#1B365D'}}" custom-style="height:88rpx;" bind:click="submit" type="info">{{item.title}}
+        <van-button round size="large" plain="{{item.plain}}"  data-item="{{item}}" color="{{item.color?item.color:'#1B365D'}}" custom-style="height:88rpx;" bind:click="submit" type="info">{{item.title}}
         </van-button>
       </view>
     </view>

+ 1 - 0
package-base-select/pages/select-functional-permissions/select-functional-permissions.js

@@ -10,6 +10,7 @@ Page({
     routeObjName: 'roleFun',
     tableData: [],
     formData: {},
+    buttonSaveList:[{code:'add',title:'保存',width:'120rpx'}],
     pageFlag:false
   },
   /**

+ 2 - 1
package-base-select/pages/select-functional-permissions/select-functional-permissions.wxml

@@ -29,4 +29,5 @@
 <dk-collapse-item list="{{tableData}}" bind:obtainList="obtainList"></dk-collapse-item>
 
 
-<dk-save-bottom flagTypeName="select-functional-permissions" bottomClass="{{true}}" bind:submit="toClose" bind:allClean="toAdd" />
+<!-- 保存 -->
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="toAdd"></dk-save-button>

+ 1 - 0
package-base-select/pages/select-sensitive-data/select-sensitive-data.js

@@ -9,6 +9,7 @@ Page({
   data: {
     routeObjName: 'roleSensitive',
     tableData: [],
+    buttonSaveList:[{code:'add',title:'保存',width:'120rpx'}],
     formData: {},
   },
   /**

+ 3 - 1
package-base-select/pages/select-sensitive-data/select-sensitive-data.wxml

@@ -60,4 +60,6 @@
 
 
 
-<dk-save-bottom flagTypeName="select-functional-permissions" bottomClass="{{true}}" bind:submit="toClose" bind:allClean="toAdd" />
+<!-- <dk-save-bottom flagTypeName="select-functional-permissions" bottomClass="{{true}}" bind:submit="toClose" bind:allClean="toAdd" /> -->
+
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="toAdd"></dk-save-button>

+ 15 - 1
package-basic-data/pages/basic-data/basic-data.js

@@ -25,6 +25,8 @@ Page({
     commonService: app.globalData['commonService'],
     routeObjName: 'basicData',
     tableData: [],
+    buttonSaveList: [{ code: 'sort', title: '排序', width: '120rpx', plain:true}, { code: 'add', title: '新建', width: '120rpx', color: '#CAA977' }],
+    contentSaveList: [],
     // 查询条件
     searchContent: [{
       code: 'flgValid', title: mixins.$t('allValidInvalid'), searchType: Constants.searchType.switch,
@@ -157,7 +159,19 @@ Page({
       routeObjNameGoTo: routeObjNameGoTo
     })
   },
-
+  /**
+ * @desc :   底部按钮
+ * @date : 2024/2/1 15:49
+ * @author : 于继渤
+ */
+  open(e) {
+    let name = e.detail.name
+    if (name == 'sort') {
+      this.toSort()
+    } else if (name == 'add') {
+      this.toAdd()
+    }
+  },
   /**
    * @desc :   启用停用
    * @date : 2024/2/1 15:49

+ 2 - 1
package-basic-data/pages/basic-data/basic-data.wxml

@@ -32,4 +32,5 @@
 
 
 <!-- 底部信息 -->
-<dk-save-bottom flagTypeName="basic-data-add" bottomClass="{{true}}" bind:submit="toSort" bind:allClean="toAdd" />
+
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="open"></dk-save-button>

+ 2 - 0
package-basic-data/pages/customer-list/customer-list.js

@@ -24,6 +24,8 @@ Page({
       { code: 'org', title: '部门', dropType: 'org' },
       { code: 'choose', title: '筛选', searchType: Constants.searchType.pick }
     ],
+    buttonSaveList:[{code:'add',title:'新建',width:'120rpx',color:'#1B365D'}],
+    contentSaveList:[{code:'need',title:'共 位客户',type:'str',color:'#1B365D'}],
     // 查询条件-筛选
     pullMenuList: [{
       code: 'customerFrom',

+ 1 - 1
package-basic-data/pages/customer-list/customer-list.wxml

@@ -18,4 +18,4 @@
 
 
 <!-- 新建按钮 -->
-<dk-save-bottom flagTypeName="customers" totallength="{{tableData.length}}" bind:submit="open" />
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="open"></dk-save-button>

+ 2 - 0
package-basic-data/pages/customer-reception/customer-reception.js

@@ -18,6 +18,8 @@ Page({
    */
   data: {
     tagList: [{ title: "所有接待", code: 'all' }, { title: "跟进任务", code: '跟进状态-跟进' }, { title: "邀约进店", code: '跟进状态-邀约' }, { title: "预约量尺", code: '跟进状态-约尺' }],
+    buttonSaveList:[{code:'add',title:'新建',width:'120rpx',color:'#1B365D'}],
+    contentSaveList:[{code:'need',title:'共条接待信息',type:'str',color:'#1B365D'}],
     // 查询条件
     searchContent: [{
       code: 'createtime',

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

@@ -18,4 +18,7 @@
 
 
 <!-- 新建按钮 -->
-<dk-save-bottom   flagTypeName="receive-customers" totallength="{{tableData.length}}" bind:submit="open" />
+<!-- <dk-save-bottom   flagTypeName="receive-customers" totallength="{{tableData.length}}" bind:submit="open" /> -->
+
+<!-- 新建按钮 -->
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="open"></dk-save-button>

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

@@ -38,7 +38,8 @@ Page({
       { name: 'brandName', title: mixins.$t('brandName') },
       { name: 'supplierNames', title: mixins.$t('supplier') }
     ],
-
+    buttonSaveList:[{code:'add',title:'新建',width:'120rpx',color:'#CAA977'}],
+    contentSaveList:[],
     formDataName: mixins.$t('goodsBrand'),
     popContent:
       [

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

@@ -50,4 +50,4 @@
 
 
 <!-- 底部信息 -->
-<dk-save-bottom flagTypeName="basic-data" bottomClass="{{true}}" bind:submit="toClose" bind:allClean="toAdd" />
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="toAdd"></dk-save-button>

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

@@ -21,6 +21,8 @@ Page({
     routeObjName: 'role',
     roleFunService: app.globalData['roleFunService'],
     roleSensitiveService: app.globalData['roleSensitiveService'],
+    buttonSaveList:[{code:'add',title:'保存',width:'120rpx',color:'#1B365D'}],
+    contentSaveList:[],
   },
 
   /**

+ 1 - 1
package-basic-data/pages/role/add/add.wxml

@@ -9,4 +9,4 @@
 
 
 <!--  保存 -->
-<dk-save-bottom flagTypeName="select-functional-permissions" bottomClass="{{true}}"  bind:submit="toClose" bind:allClean="save" />
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="save"></dk-save-button>

+ 3 - 19
package-basic-data/pages/role/role.js

@@ -16,6 +16,8 @@ Page({
       { name: 'copyAdd', title: mixins.$t('copyAndAdd'),formMode: Constants.formMode.edit,formType: Constants.formMode.add, idKey: 'roleId', }, 
       { name: 'selectSensitiveData', title: mixins.$t('sensitiveData'),formType: Constants.formMode.add }
     ],
+    buttonSaveList:[{code:'add',title:'新建角色',width:'120rpx',color:'#1B365D'}],
+    contentSaveList:[],
     // 路由
     routeObjName: 'role',
     tableData: [],
@@ -68,25 +70,7 @@ Page({
       buttonList: buttonList
     })
   },
-  /**
-     * @desc :   新建跳转
-     * @date : 2024/2/1 15:49
-     * @author : 于继渤
-     */
-  toAdd() {
-    wx.navigateTo({
-      url: this.data.route.add.url,
-      events: function (e) {
-        console.log('回调后,在这里给页面赋值')
-        // 回调后,在这里给页面赋值
-     
-      },
-      success: function (res) {
-        // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
-        res.eventChannel.emit('params', {})
-      }
-    })
-  },
+
   /**
     * @desc :   处理接口返回数据
     * @date : 2024/2/1 15:49

+ 1 - 1
package-basic-data/pages/role/role.wxml

@@ -16,4 +16,4 @@
 
 
 <!-- 新建按钮 -->
-<dk-save-bottom flagTypeName="role-add" bottomClass="{{true}}" bind:submit="toClose" bind:allClean="toAdd" />
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="open"></dk-save-button>