Ver Fonte

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

wangyingjie há 2 anos atrás
pai
commit
b0a9781e39

+ 1 - 0
api/pages/common/common.js

@@ -23,5 +23,6 @@ module.exports = {
         unitListBy: 'unit_list_by', //计量单位
         unitListBy: 'unit_list_by', //计量单位
         warehouseListBy: 'get_warehouse_by_page', //仓库档案
         warehouseListBy: 'get_warehouse_by_page', //仓库档案
         getDictionaryData: 'get_dictionary_data', //数据字典
         getDictionaryData: 'get_dictionary_data', //数据字典
+        getDataKind: 'get_data_kind', //数据字典
     },
     },
 };
 };

+ 1 - 1
api/pages/mst/staff.js

@@ -11,7 +11,7 @@ module.exports = {
     staffService: {
     staffService: {
         // 前缀
         // 前缀
         prefix: 'mdm-server-dkic-b1/mst/staff/', 
         prefix: 'mdm-server-dkic-b1/mst/staff/', 
-        
+        insertRequestStaff:'insert_request',
     },
     },
 
 
     routeUrl: {
     routeUrl: {

+ 5 - 2
components/dkbase/dk-form-bill/dk-form-bill.js

@@ -83,6 +83,9 @@ Component({
       type:String,
       type:String,
       value:'useCollect'
       value:'useCollect'
     },
     },
+    popContent:{
+      type:Array,
+    },
     // 结果集
     // 结果集
     value: {
     value: {
       type: String,
       type: String,
@@ -118,8 +121,8 @@ Component({
     dropName: null,
     dropName: null,
     itemName: 'goodsList',
     itemName: 'goodsList',
     selectGoodsUrl: null,
     selectGoodsUrl: null,
-    popContent:
-      [{ code: 'quantity', type: 'step', title: '数量', required: true }, { code: 'pricePromotion', type: 'number', title: '销售价格', required: true }, { code: 'warehouseId', name: 'warehouseName', type: 'drop', required: true, dropType: 'warehouse' , required: true}, { code: 'color', type: 'str', title: '批次号' , required: true}, { code: 'giftFlag', type: 'checkbox', title: '赠品标识' }],
+    // popContent:
+    //   [{ code: 'quantity', type: 'step', title: '数量', required: true }, { code: 'pricePromotion', type: 'number', title: '销售价格', required: true }, { code: 'warehouseId', name: 'warehouseName', type: 'drop', required: true, dropType: 'warehouse' , required: true}, { code: 'color', type: 'str', title: '批次号' , required: true}, { code: 'giftFlag', type: 'checkbox', title: '赠品标识' }],
     form: {}
     form: {}
   },
   },
   lifetimes: {
   lifetimes: {

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

@@ -84,6 +84,11 @@ Component({
         form['addressName'] = location.name;
         form['addressName'] = location.name;
         form['addressFull'] = location.address + location.name;
         form['addressFull'] = location.address + location.name;
         form['addressGcj02'] = { latitude: location.latitude, longitude: location.longitude };
         form['addressGcj02'] = { latitude: location.latitude, longitude: location.longitude };
+        form['addressArea'] = {
+          province: location.province,
+          city: location.city,
+          district: location.district == undefined || !location.district ? location.city : location.district
+      }
         // 如果有校验信息就清除掉
         // 如果有校验信息就清除掉
         let card = this.data.card;
         let card = this.data.card;
         let index = this.data.index;
         let index = this.data.index;
@@ -217,7 +222,7 @@ Component({
       })
       })
       // 是否根据值进行控制其他组件显示、隐藏
       // 是否根据值进行控制其他组件显示、隐藏
       let changeObj = this.data.changeObj
       let changeObj = this.data.changeObj
-      let key = util.getKeyByValue(Constants.dataKind, e.detail.value);
+      let key = util.getKeyByValue(Constants.kindCode, e.detail.value);
       if (changeObj && changeObj[key]) {
       if (changeObj && changeObj[key]) {
         // 显示
         // 显示
         if (changeObj[key]['visible']) {
         if (changeObj[key]['visible']) {

+ 18 - 0
components/dkbase/dk-save-bottom/dk-save-bottom.wxml

@@ -1140,6 +1140,24 @@
       </van-button>
       </van-button>
     </view> -->
     </view> -->
   </view>
   </view>
+
+  <view wx:if="{{flagTypeName ==='basic-data-add'}}" style="display: flex; padding:35rpx 34rpx 62rpx 34rpx;">
+
+<view style="width:48%">
+  <van-button size="large" plain round color="#1B365D" custom-style="height:88rpx;" bind:click="submit" type="default">排序
+  </van-button>
+</view>
+<view style="width: 4%;"></view>
+<view style="width:100%;">
+  <van-button size="large" round color="#CAA977" custom-style="height:88rpx;" bind:click="allClean" type="default">新建
+  </van-button>
+</view>
+
+<!-- <view style="width:100%;">
+  <van-button size="large" round color="#CAA977" custom-style="height:88rpx;" bind:click="allClean" type="default">新建
+  </van-button>
+</view> -->
+</view>
   <view wx:if="{{flagTypeName ==='Product-file'}}" style="display: flex; padding:35rpx 34rpx 62rpx 34rpx;">
   <view wx:if="{{flagTypeName ==='Product-file'}}" style="display: flex; padding:35rpx 34rpx 62rpx 34rpx;">
 
 
 
 

+ 6 - 1
i18n/zh-CN.js

@@ -172,6 +172,10 @@ const accountsManage = {
   collection: '收款',
   collection: '收款',
 
 
 }
 }
+
+const  customer = {
+  cusPhone:'客户电话'
+}
 // 提示信息
 // 提示信息
 const messages = {
 const messages = {
 }
 }
@@ -214,6 +218,7 @@ const supplier = {
   serviceProvider: "服务供应商",
   serviceProvider: "服务供应商",
   meet: "应付",
   meet: "应付",
   save: '保存',
   save: '保存',
+  confirm: '确定',
   returnAddress:'退货地址',
   returnAddress:'退货地址',
   serviceCategories:'服务类别'
   serviceCategories:'服务类别'
 }
 }
@@ -247,5 +252,5 @@ const fund ={
 
 
 }
 }
 module.exports = {
 module.exports = {
-  items: Object.assign({}, fund,home, basicData, columns, saleOrder, button, messages, others, accountsManage, org, supplier, goodsSku)
+  items: Object.assign({}, fund,home, basicData, columns, saleOrder, button, messages, others, accountsManage, org, supplier, goodsSku,customer)
 }
 }

+ 36 - 3
mixins/index.js

@@ -50,6 +50,8 @@ module.exports = {
     formMode: null,
     formMode: null,
     // id
     // id
     id: null,
     id: null,
+    // other
+    other: null,
     // 当前数据
     // 当前数据
     item: null,
     item: null,
     // 语言包
     // 语言包
@@ -86,7 +88,7 @@ module.exports = {
       loading: true
       loading: true
     })
     })
     // 如果重新查询,需要nomore标识重置为false
     // 如果重新查询,需要nomore标识重置为false
-    if(e != 'more' && this.data.noMore){
+    if (e != 'more' && this.data.noMore) {
       this.setData({
       this.setData({
         noMore: false
         noMore: false
       })
       })
@@ -104,9 +106,9 @@ module.exports = {
       if (res && res.data.code === Constants.SUCESS_CODE) {
       if (res && res.data.code === Constants.SUCESS_CODE) {
         let tableData = this.data.tableData;
         let tableData = this.data.tableData;
         let list = []
         let list = []
-        if(res.data.data && Array.isArray( res.data.data)){
+        if (res.data.data && Array.isArray(res.data.data)) {
           list = res.data.data;
           list = res.data.data;
-        }else{
+        } else {
           list = res.data.data.list
           list = res.data.data.list
         }
         }
         // 如果不是翻页,需要清空
         // 如果不是翻页,需要清空
@@ -422,6 +424,30 @@ module.exports = {
   detail(id) {
   detail(id) {
     return this.excute(this.data.service, id, null);
     return this.excute(this.data.service, id, null);
   },
   },
+
+  /**
+   * @desc   : 查询明细的方法(不给外部调用)
+   * @author : 周兴
+   * @date   : 2022/12/8 17:56
+   */
+  _other(param) {
+    this.loading = true;
+    // 给参数赋值
+    let params = this._setSearchParams();
+    this._getData(params).then(res => {
+      if (res && res.data.code === Constants.SUCESS_CODE) {
+        console.log("_other", res);
+        // 给变量赋值
+        if (this.setValuesByEdit) {
+          this.setValuesByEdit(res.data.data)
+        }
+      }
+      setTimeout(() => {
+        this.loading = false
+      }, 300)
+    });
+
+  },
   /**
   /**
    * @desc : 执行方法
    * @desc : 执行方法
    * @author : 周兴
    * @author : 周兴
@@ -532,6 +558,12 @@ module.exports = {
         // 调用明细
         // 调用明细
         this._detail(id);
         this._detail(id);
       }
       }
+    } else if (formMode == Constants.formMode.other) {
+      let other = this.data.other;
+      if (other) {
+        // 调用
+        this._other(other);
+      }
     }
     }
   },
   },
   /**
   /**
@@ -567,6 +599,7 @@ module.exports = {
         if (data.formMode) {
         if (data.formMode) {
           _this.setData({
           _this.setData({
             id: data.id,
             id: data.id,
+            other: data.other,
             formMode: data.formMode,
             formMode: data.formMode,
           })
           })
         }
         }

+ 23 - 42
package-basic-data/pages/basic-data/basic-data.js

@@ -22,6 +22,7 @@ Page({
     //接口
     //接口
     warehouseService: app.globalData['warehouseService'],
     warehouseService: app.globalData['warehouseService'],
     saleChannelService: app.globalData['saleChannelService'],
     saleChannelService: app.globalData['saleChannelService'],
+    commonService: app.globalData['commonService'],
     routeObjName: 'basicData',
     routeObjName: 'basicData',
     tableData: [],
     tableData: [],
     // 查询条件
     // 查询条件
@@ -32,45 +33,7 @@ Page({
         { code: 1, title: mixins.$t('valid'), value: true },
         { code: 1, title: mixins.$t('valid'), value: true },
         { code: 2, title: mixins.$t('invalid'), value: false }]
         { code: 2, title: mixins.$t('invalid'), value: false }]
     }],
     }],
-    sidebarList: [
-      {
-        id: 0,
-        name: mixins.$t('warehouse')
-      },
-      {
-        id: 1,
-        name: mixins.$t('saleChannel')
-      },
-      {
-        id: 2,
-        name: mixins.$t('incomeCategory')
-      },
-      {
-        id: 3,
-        name: mixins.$t('expenditureCategory')
-      },
-      {
-        id: 4,
-        name: mixins.$t('reasonStorage')
-      },
-      {
-        id: 5,
-        name: mixins.$t('reasonOutbound')
-      },
-      {
-        id: 6,
-        name: mixins.$t('accountCategory')
-      },
-      {
-        id: 7,
-        name: mixins.$t('customerSource')
-      },
-      {
-        id: 8,
-        name: mixins.$t('customerlabel')
-      },
-
-    ],
+    sidebarList: [],
     contentList: [
     contentList: [
       { name: 'whCode', title: mixins.$t('whCode') },
       { name: 'whCode', title: mixins.$t('whCode') },
       { name: 'whName', title: mixins.$t('whName') },
       { name: 'whName', title: mixins.$t('whName') },
@@ -228,7 +191,8 @@ Page({
 
 
     let detail = e.detail
     let detail = e.detail
     this.setData({
     this.setData({
-      formDataName: this.data.sidebarList[detail].name
+      formDataName: this.data.sidebarList[detail].kindName,
+      dictCode: this.data.sidebarList[detail].kindCode
     })
     })
     this.setPopContent();
     this.setPopContent();
     this.searchData()
     this.searchData()
@@ -291,7 +255,7 @@ Page({
     } else if (params.flgValidList && params.flgValidList.indexOf("true") == -1 && params.flgValidList.indexOf("false") != -1) {
     } else if (params.flgValidList && params.flgValidList.indexOf("true") == -1 && params.flgValidList.indexOf("false") != -1) {
       params.flgValid = false
       params.flgValid = false
     }
     }
-    params.dictCode = this.data.formDataName
+    params.dictCode = this.data.dictCode
     params.cpId = 1
     params.cpId = 1
     return params
     return params
   },
   },
@@ -316,6 +280,22 @@ Page({
 
 
   },
   },
   /**
   /**
+    * @desc :   获取左侧数据
+    * @date : 2024/2/1 15:49
+    * @author : 于继渤
+    */
+  getDataKind() {
+    return this.excute(this.data.commonService, this.data.commonService.getDataKind, {
+      kindType: Constants.kindType.basicData
+    }).then(res => {
+      this.setData({
+        sidebarList: res.data.data
+      })
+    })
+  },
+
+
+  /**
     * @desc :   处理接口返回数据
     * @desc :   处理接口返回数据
     * @date : 2024/2/1 15:49
     * @date : 2024/2/1 15:49
     * @author : 于继渤
     * @author : 于继渤
@@ -364,7 +344,7 @@ Page({
       } else { //基础数据
       } else { //基础数据
         service = this.data.service
         service = this.data.service
         id = params.data_id
         id = params.data_id
-        params.dictCode = this.data.formDataName
+        params.dictCode = this.data.dictCode
       }
       }
     if (id) { //编辑
     if (id) { //编辑
       return this.excute(service, service.update, params);
       return this.excute(service, service.update, params);
@@ -378,6 +358,7 @@ Page({
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */
   onLoad(options) {
   onLoad(options) {
+    this.getDataKind()
     let _this = this;
     let _this = this;
     wx.getSystemInfo({
     wx.getSystemInfo({
       success: function (res) {
       success: function (res) {

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

@@ -10,7 +10,7 @@
   <!-- 左侧菜单列表 -->
   <!-- 左侧菜单列表 -->
   <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="left-class">
   <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="left-class">
     <view style="height:calc({{windowHeight+'px'}} - {{'390rpx'}});overflow: scroll;">
     <view style="height:calc({{windowHeight+'px'}} - {{'390rpx'}});overflow: scroll;">
-      <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.name}}" data-id="{{item.id}}" wx:for="{{sidebarList}}" />
+      <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.kindName}}" data-id="{{item.id}}" wx:for="{{sidebarList}}" />
     </view>
     </view>
   </van-sidebar>
   </van-sidebar>
   <view style="margin-left: 140rpx;width: 100%;">
   <view style="margin-left: 140rpx;width: 100%;">
@@ -32,4 +32,4 @@
 
 
 
 
 <!-- 底部信息 -->
 <!-- 底部信息 -->
-<dk-save-bottom flagTypeName="basic-data" bottomClass="{{true}}" bind:submit="toSort" bind:allClean="toAdd" />
+<dk-save-bottom flagTypeName="basic-data-add" bottomClass="{{true}}" bind:submit="toSort" bind:allClean="toAdd" />

+ 29 - 10
package-basic-data/pages/customer-list/add/add.js

@@ -17,30 +17,49 @@ Page({
    */
    */
   data: {
   data: {
     routeObjName: 'customer',
     routeObjName: 'customer',
-    cardList: ['main','center','remarks'],
+    cardList: ['main', 'center', 'remarks'],
     contentObj: {
     contentObj: {
       main: [
       main: [
         { code: 'cusName', type: 'str', required: true, title: mixins.$t('customerName') },
         { code: 'cusName', type: 'str', required: true, title: mixins.$t('customerName') },
         { code: 'cusPhone', type: 'phone', title: '客户电话', required: true },
         { code: 'cusPhone', type: 'phone', title: '客户电话', required: true },
         { code: 'addressFull', type: 'address', title: '客户地址', required: true },
         { code: 'addressFull', type: 'address', title: '客户地址', required: true },
-        { code: 'addressNo', type: 'str', required: true, title:'门牌号' },
-        { code: 'cusFromId', name: 'cusFromName', type: 'drop', required: true, dropType: 'customerFrom',title:'客户来源' },
+        { code: 'addressNo', type: 'str', required: true, title: '门牌号' },
+        { code: 'cusFromId', name: 'cusFromName', type: 'drop', required: true, dropType: 'customerFrom', title: '客户来源' },
         { code: 'contactName', type: 'str', required: false, title: '联系人' },
         { code: 'contactName', type: 'str', required: false, title: '联系人' },
-        { code: 'contactPhone', type: 'phone', title: '联系电话', required: false },
+        { code: 'contactPhone', type: 'str', title: '联系电话', required: false },
       ],
       ],
-      center:[
-        { code: 'channelId', name: 'channelName', type: 'drop', required: true, dropType: 'saleChannel',title:'销售渠道' },
-        { code: 'staffId', name: 'staffName', type: 'drop', required: true, dropType: 'staff',title:'销售人员' },
-        { code: 'orgId', name: 'orgName', type: 'drop', required: true, dropType: 'org',title:'销售部门' },
-        { code: 'addressNo', type: 'str', required: false, title:'初次欠款' },
+      center: [
+        { code: 'channelId', name: 'channelName', type: 'drop', required: true, dropType: 'saleChannel', title: '销售渠道' },
+        { code: 'staffId', name: 'staffName', type: 'drop', required: true, dropType: 'staff', title: '销售人员' },
+        { code: 'orgId', name: 'orgName', type: 'drop', required: true, dropType: 'org', title: '销售部门' },
+        { code: 'addressNo', type: 'str', required: false, title: '初次欠款' },
       ],
       ],
-      remarks:[
+      remarks: [
         { code: 'remarks', type: 'textarea', title: mixins.$t('remarks') }
         { code: 'remarks', type: 'textarea', title: mixins.$t('remarks') }
       ]
       ]
     },
     },
   },
   },
+  /**
+  * @desc : 设置保存参数
+  * @date : 2024/2/1 15:49
+  * @author : 于继渤
+  */
+  setParams(params) {
+    return params
+  },
+
+
 
 
   /**
   /**
+  * @desc : 保存数据服务
+  * @date : 2024/2/1 15:49
+  * @author : 于继渤
+  */
+  saveData() {
+    return this.excute(this.data.service, this.data.service.insert, this.data.params);
+
+  },
+  /**
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */
   onLoad(options) {
   onLoad(options) {

+ 19 - 7
package-basic-data/pages/product-attribute/product-attribute.js

@@ -21,6 +21,7 @@ Page({
     goodsCategoryService: app.globalData['goodsCategoryService'],
     goodsCategoryService: app.globalData['goodsCategoryService'],
     goodsSeriesService: app.globalData['goodsSeriesService'],
     goodsSeriesService: app.globalData['goodsSeriesService'],
     unitService: app.globalData['unitService'],
     unitService: app.globalData['unitService'],
+    commonService: app.globalData['commonService'],
     // 路由
     // 路由
     routeObjName: 'product-attribute',
     routeObjName: 'product-attribute',
     // 查询条件
     // 查询条件
@@ -37,12 +38,7 @@ Page({
       { name: 'brandName', title: mixins.$t('brandName') },
       { name: 'brandName', title: mixins.$t('brandName') },
       { name: 'supplierNames', title: mixins.$t('supplier') }
       { name: 'supplierNames', title: mixins.$t('supplier') }
     ],
     ],
-    sidebarList: [
-      { id: 0, name: mixins.$t('goodsBrand') },
-      { id: 1, name: mixins.$t('goodsCategory') },
-      { id: 2, name: mixins.$t('goodsSeries') },
-      { id: 3, name: mixins.$t('unit') }
-    ],
+
     formDataName: mixins.$t('goodsBrand'),
     formDataName: mixins.$t('goodsBrand'),
     popContent:
     popContent:
       [
       [
@@ -200,7 +196,7 @@ Page({
   changeSidebar(e) {
   changeSidebar(e) {
     let detail = e.detail
     let detail = e.detail
     this.setData({
     this.setData({
-      formDataName: this.data.sidebarList[detail].name
+      formDataName: this.data.sidebarList[detail].kindName
     })
     })
     this.searchData()
     this.searchData()
   },
   },
@@ -289,6 +285,21 @@ Page({
     }
     }
 
 
   },
   },
+
+   /**
+    * @desc :   获取左侧数据
+    * @date : 2024/2/1 15:49
+    * @author : 于继渤
+    */
+   getDataKind() {
+    return this.excute(this.data.commonService, this.data.commonService.getDataKind, {
+      kindType: Constants.kindType.goodsAttr
+    }).then(res => {
+      this.setData({
+        sidebarList: res.data.data
+      })
+    })
+  },
   /**
   /**
    * @desc : 设置pop字段
    * @desc : 设置pop字段
    * @author : 于继渤
    * @author : 于继渤
@@ -346,6 +357,7 @@ Page({
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */
   onLoad(options) {
   onLoad(options) {
+    this.getDataKind()
     let _this = this;
     let _this = this;
     wx.getSystemInfo({
     wx.getSystemInfo({
       success: function (res) {
       success: function (res) {

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

@@ -10,7 +10,7 @@
   <!-- 左侧菜单列表 -->
   <!-- 左侧菜单列表 -->
   <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="left-class" >
   <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="left-class" >
     <view style="height:calc({{windowHeight+'px'}} - {{'220rpx'}});overflow: scroll;background-color:#ECF2FF">
     <view style="height:calc({{windowHeight+'px'}} - {{'220rpx'}});overflow: scroll;background-color:#ECF2FF">
-      <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.name}}" data-id="{{item.id}}" wx:for="{{sidebarList}}" />
+      <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.kindName}}" data-id="{{item.id}}" wx:for="{{sidebarList}}" />
     </view>
     </view>
   
   
   </van-sidebar>
   </van-sidebar>

+ 1 - 1
package-basic-data/pages/staff/add/add.js

@@ -18,7 +18,7 @@ Page({
     cardList: ['main'],
     cardList: ['main'],
     contentObj: {
     contentObj: {
       main: [
       main: [
-        { code: 'staffCode', type: 'str', readonly:true, title: mixins.$t('staffCode') },
+        
         { code: 'staffName', type: 'str', required: true, title: mixins.$t('staffName') },
         { code: 'staffName', type: 'str', required: true, title: mixins.$t('staffName') },
         { code: 'staffPhone', type: 'phone', title: mixins.$t('staffPhone'), required: true },
         { code: 'staffPhone', type: 'phone', title: mixins.$t('staffPhone'), required: true },
         { code: 'orgId', name: 'orgName', type: 'drop', required: true, dropType: 'org' },
         { code: 'orgId', name: 'orgName', type: 'drop', required: true, dropType: 'org' },

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

@@ -7,6 +7,6 @@
 </dk-form>
 </dk-form>
 <!--  保存 -->
 <!--  保存 -->
 <view class="bottom-class">
 <view class="bottom-class">
-  <van-button custom-class="save-button-class" disabled="{{loading}}" loading="{{loading}}" bind:click="save" type="default">保存
+  <van-button custom-class="save-button-class" disabled="{{loading}}" loading="{{loading}}" bind:click="save" type="default">{{$t['save']}}
   </van-button>
   </van-button>
 </view>
 </view>

+ 8 - 17
package-basic-data/pages/staff/detail/detail.js

@@ -20,13 +20,12 @@ Page({
     cardList: ['main'],
     cardList: ['main'],
     contentObj: {
     contentObj: {
       main: [
       main: [
-        { code: 'staffCode', type: 'str', readonly: true, title: mixins.$t('staffCode') },
+       
         { code: 'staffName', type: 'str', required: true, title: mixins.$t('staffName') },
         { code: 'staffName', type: 'str', required: true, title: mixins.$t('staffName') },
         { code: 'staffPhone', type: 'phone', title: mixins.$t('staffPhone'), required: true },
         { code: 'staffPhone', type: 'phone', title: mixins.$t('staffPhone'), required: true },
         { code: 'orgId', name: 'orgName', type: 'drop', required: true, dropType: 'org' },
         { code: 'orgId', name: 'orgName', type: 'drop', required: true, dropType: 'org' },
         { code: 'roleId', name: 'roleName', type: 'mutidrop', required: false, dropType: 'role' },
         { code: 'roleId', name: 'roleName', type: 'mutidrop', required: false, dropType: 'role' },
-        { code: 'flgCanLogin', type: 'checkbox', title: mixins.$t('flgCanLogin') },
-        { code: 'remarks', type: 'textarea', title: mixins.$t('remarks') }
+      
       ]
       ]
     },
     },
     // 路由
     // 路由
@@ -61,22 +60,10 @@ Page({
   * @author : 姜永辉
   * @author : 姜永辉
   */
   */
   saveData() {
   saveData() {
-    if (this.data.formMode == Constants.formMode.edit) {
-      return this.excute(this.data.service, this.data.service.update, this.data.params)
-    } else {
-      return this.excute(this.data.service, this.data.service.insert, this.data.params)
-    }
-
+    return this.excute(this.data.service, this.data.service.insertRequestStaff, this.data.params)
   },
   },
 
 
-  /**
-   * @desc :   处理接口返回数据
-   * @date : 2024/2/1 15:49
-   * @author : 于继渤
-   */
-  handleSearchData(tableData) {
-    console.log("handleSearchData", tableData);
-  },
+ 
   /**
   /**
    * @desc : 给表单赋值
    * @desc : 给表单赋值
    * @date : 2024/2/1 15:49
    * @date : 2024/2/1 15:49
@@ -84,6 +71,10 @@ Page({
    */
    */
   setValuesByEdit(data) {
   setValuesByEdit(data) {
     console.log("setValuesByEdit", data);
     console.log("setValuesByEdit", data);
+    data.staffPhone = data.userPhone
+    data.staffName = data.userPhone
+    data.flgCanLogin = true
+    data.wxUserId = data.userId
     this.setData({
     this.setData({
       formData: JSON.stringify(data)
       formData: JSON.stringify(data)
     })
     })

+ 1 - 1
package-basic-data/pages/staff/detail/detail.wxml

@@ -7,6 +7,6 @@
 </dk-form>
 </dk-form>
 <!--  保存 -->
 <!--  保存 -->
 <view class="bottom-class">
 <view class="bottom-class">
-  <van-button custom-class="save-button-class" disabled="{{loading}}" loading="{{loading}}" bind:click="save" type="default">保存
+  <van-button custom-class="save-button-class" disabled="{{loading}}" loading="{{loading}}" bind:click="save" type="default">{{$t['confirm']}}
   </van-button>
   </van-button>
 </view>
 </view>

+ 16 - 16
pages/home-page/home-page.js

@@ -11,7 +11,7 @@
 const app = getApp()
 const app = getApp()
 const api = require('@/utils/api.js');
 const api = require('@/utils/api.js');
 const config = require('@/config/config.js');
 const config = require('@/config/config.js');
-const Constants = require('@/utils/Constants.js'); 
+const Constants = require('@/utils/Constants.js');
 const util = require('@/utils/util.js')
 const util = require('@/utils/util.js')
 const mixins = require('@/mixins/index.js')
 const mixins = require('@/mixins/index.js')
 
 
@@ -205,24 +205,24 @@ Page({
       }
       }
     })
     })
 
 
-    console.log("homepage",options); 
+    console.log("homepage", options);
     // options 中的 scene  
     // options 中的 scene  
     if (options.scene) {
     if (options.scene) {
-        var scene = options.scene
-        
-        // 邀请员工的确认
-        wx.navigateTo({
-          url: '/package-basic-data/pages/staff/detail/detail',
-          events: {
-            // 回调后,在这里给页面赋值
-            bandData: function (e) {
-            }
-          },
-          success: function (res) {
-            // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
-            res.eventChannel.emit('params', {  formType: scene})
+      var scene = options.scene
+
+      // 邀请员工的确认
+      wx.navigateTo({
+        url: '/package-basic-data/pages/staff/detail/detail',
+        events: {
+          // 回调后,在这里给页面赋值
+          bandData: function (e) {
           }
           }
-        })
+        },
+        success: function (res) {
+          // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+          res.eventChannel.emit('params', { other: scene, formMode: Constants.formMode.other })
+        }
+      })
 
 
     }
     }
 
 

+ 2 - 2
pages/mine/mine.wxml

@@ -414,10 +414,10 @@
     <view class="todo-view-title" catch:tap="toSetting">{{$t['settingCommany']}}</view>
     <view class="todo-view-title" catch:tap="toSetting">{{$t['settingCommany']}}</view>
   </view>
   </view>
 
 
-  <!-- <view style="height: 30rpx;"></view>
+  <view style="height: 30rpx;"></view>
   <view class="todo-view">
   <view class="todo-view">
     <view class="todo-view-title" catch:tap="toPay">微信支付</view>
     <view class="todo-view-title" catch:tap="toPay">微信支付</view>
-  </view> -->
+  </view>
   <view style="height: 30rpx;"></view>
   <view style="height: 30rpx;"></view>
   <view class="todo-view" style="display: flex;justify-content:space-between;align-items: center;">
   <view class="todo-view" style="display: flex;justify-content:space-between;align-items: center;">
     <view class="todo-view-title ">标准版</view>
     <view class="todo-view-title ">标准版</view>

+ 2 - 2
pages/welcome/welcome.js

@@ -123,8 +123,8 @@ Page({
             app.globalData.user = res.data.data
             app.globalData.user = res.data.data
             app.globalData.token = res.data.data.accessToken
             app.globalData.token = res.data.data.accessToken
             wx.reLaunch({
             wx.reLaunch({
-                url: '../../pages/home-page/home-page'  ,
-                // url: '../../pages/home-page/home-page?scene=' + 'oNIC56zcqYkZrgovQK2_90u2g90o',
+                // url: '../../pages/home-page/home-page'  ,
+                url: '../../pages/home-page/home-page' ,
             })
             })
 
 
             // if (res.data.code === Constants.SUCESS_CODE) {
             // if (res.data.code === Constants.SUCESS_CODE) {

+ 4 - 2
utils/Constants.js

@@ -83,7 +83,9 @@ module.exports = {
     // 编辑
     // 编辑
     edit:'edit',
     edit:'edit',
     // 明细
     // 明细
-    detail:'detail'
+    detail:'detail',
+    // 其他
+    other:'other'
   },
   },
 
 
   // 查询条件日期数据源
   // 查询条件日期数据源
@@ -171,7 +173,7 @@ module.exports = {
    * @author : 周兴
    * @author : 周兴
    * @date   : 2024/3/9 16:17
    * @date   : 2024/3/9 16:17
    */
    */
-  dataKind:{
+  kindCode:{
     supplierPur:'供应商类别-采购',
     supplierPur:'供应商类别-采购',
     supplierService:'供应商类别-服务',
     supplierService:'供应商类别-服务',
     serviceDelivery:'服务类别-配送',
     serviceDelivery:'服务类别-配送',