于继渤 před 2 roky
rodič
revize
a7ed161ac2

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

@@ -466,7 +466,7 @@ Component({
     let card = this.data.card;
     let code = this.data.key;
     form[code + '_time'] = e.detail
-    form[code] = util.getobjDate(e.detail);
+    form[code] = util.formatDataTime(new Date(e.detail));
     let contentObj = this.data.contentObj;
     if (card && contentObj[card][index]?.errMsg && e.detail) {
       contentObj[card][index].errMsg = undefined;

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

@@ -77,5 +77,5 @@
 
 <!--日期-->
 <van-popup show="{{ showDateTime }}" custom-style="border-radius:30rpx 30rpx 0 0;" position="bottom" bind:close="cancelDatePopTime">
-  <van-datetime-picker type="dateTime" value="{{ currentDate }}" bind:confirm="chooseDateTime" bind:cancel="cancelDatePopTime" loading="{true}" />
+  <van-datetime-picker type="datetime" value="{{ currentDate }}" bind:confirm="chooseDateTime" bind:cancel="cancelDatePopTime" loading="{true}" />
 </van-popup>

+ 42 - 278
package-basic-data/pages/customer-reception/customer-reception.js

@@ -5,20 +5,21 @@
  *		2.客户资料列表
  * 编辑履历:
  *		作者				日期					版本				修改内容
- *		王英杰		        2022-0-12	            1.00		   	    
+ *		yjb		        2022-0-12	            1.00		   	    
  *******************************************************************************/
 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 app = getApp()
 Page({
   mixins: [mixins],
   /**
    * 页面的初始数据 
    */
   data: {
-    tagList:[{title:"潜在客户"},{title:"公海客户"},{title:"邀约进店"},{title:"预约量尺"}],
-     // 查询条件
-     searchContent: [{
+    tagList: [{ title: "潜在客户" }, { title: "公海客户" }, { title: "邀约进店" }, { title: "预约量尺" }],
+    // 查询条件
+    searchContent: [{
       code: 'createtime',
       title: '近30天',
       defaultValue: 5,
@@ -63,7 +64,7 @@ Page({
           value: "订单状态-冲正"
         }
       ]
-      
+
     }, {
       code: 'choose',
       title: '筛选',
@@ -87,300 +88,63 @@ Page({
       code: 'ageComposition',
       pullType: 'mSelect',
       typeName: 'ageComposition'
-    } ],
-
-    // 假数据
-    dataList: [{
-      salesChannelName: '',
-      customerId: 11,
-      customerName: '张三',
-      displayStatus: '成交客户',
-      orderNo: 'SA-LWYD-ZOO-202401300SBG',
-      customerPhone: '15659741980',
-      addressFull: '辽宁省沈阳市浑南区沈阳市浑南区人民政府(新聪街西)1',
-      orgName: '零售部',
-      staffName: '薛玉',
-      tsumAmount: 3000,
-      categoryQuantity: '',
-      tsumQuantity: 1,
-      data:'2024-03-12',
-      amont:1009,
-      makeTime: '' ,
-      customerForm:'自然进店',tags:['ff','ddd']
-    }, {
-      salesChannelName: '',
-      customerName: '李四',
-      displayStatus: '潜在客户', 
-      orderNo: 'SA-LWYD-ZOO-202401300SBD',
-      customerPhone: '15659741980',
-      addressFull: '辽宁省沈阳市浑南区沈阳市浑南区人民政府(新聪街西)2',
-      orgName: '零售部',
-      staffName: '薛玉',
-      tsumAmount: 4000,
-      categoryQuantity: '',
-      tsumQuantity: 2,
-      data:'2024-03-12',
-      amont:1009,
-      makeTime: '' 
     }],
 
- 
-    // 列表区(脚部信息)
-    footerInfo: [{
-      name: 'categoryQuantity',
-      title: '跟进'
-    }, {
-      name: 'tsumQuantity',
-      title: '件'
-    }],
+
     // 列表区(内容)
-    contentList: [{
-      name: 'orderNo',
-      title: '出库单号'
-    },{
-      name: 'customerPhone',
-      title: '客户电话',
-      phone:true
-    }, {
-      name: 'addressFull',
-      title: '客户地址'
-    }, {
-      name: [{
-        name: 'orgName',
-        title: ''
-      }, {
-        name: 'staffName',
-        title: '业务员'
-      }],
-      title: '门店信息'
-    },  {
-      name: 'data',
-      title: '提醒时间'
-    }],
+    contentList: [
+      { name: 'cusPhone', title: '客户电话', phone: true },
+      { name: 'addressFull', title: '客户地址' },
+      { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: '业务员 ' }], title: '门店信息' },
+      { name: 'nextFollowTime', title: '提醒时间' }
+    ],
 
-    contentObj: {
-      '成交': [{
-        name: 'orderNo',
-        title: '订单单号'
-      } , {
-        name: [{
-          name: 'orgName',
-          title: ''
-        }, {
-          name: 'staffName',
-          title: '业务员'
-        }],
-        title: '客户地址'
-      }],
-      '未成交': [{
-        name: 'orderNo',
-        title: '订单单号'
-      }, {
-        name: 'customerPhone',
-        title: '客户电话'
-      }, {
-        name: [{
-          name: 'orgName',
-          title: ''
-        }, {
-          name: 'staffName',
-          title: '业务员'
-        }],
-        title: '客户地址'
-      }]
-    },
+     // 列表区(脚部信息)
+     footerInfo: [{
+      prefix: '跟进 ',
+      name: 'followCount',
+      title: ' 次'
+    },],
 
     // 弹出按钮
     buttonList: [{
       name: 'customerRefund',
       title: '出库办理'
-      }, {
-        name: 'customerRefundList',
-        title: '作废'
-      } , {
-        name: 'customerRefundList',
-        title: '打印票据'
-      } 
-     
+    }, {
+      name: 'customerRefundList',
+      title: '作废'
+    }, {
+      name: 'customerRefundList',
+      title: '打印票据'
+    }
+
     ],
 
     totallength: 0, //视图下方提醒数量
 
     // 路由
-    routeObjName: 'customer',
-    active:0
+    routeObjName: 'cusFollow',
+    active: 0
   },
-   /**
-   * 切换 已出库 未出库
-   */
+  /**
+  * 切换 已出库 未出库
+  */
   onChangeTabs(e) {
-      let index =   e.detail.detail.index
-      console.log("qeaqwewa", index)
+    let index = e.detail.detail.index
+    console.log("qeaqwewa", index)
     console.log("qeaqwewa", e)
     this.setData({
-      active:index, 
+      active: index,
     })
-     
-  },
-  /**
-   * 跳转客户详细
-   */
-  toDetail(e) {
-   
-    let item = e.currentTarget.dataset.item
-    if(this.data.active ==1 ){  
- 
-     wx.navigateTo({
-       url: '/package-basic-data/pages/customer-follow-up/detail/detail?item=' + encodeURIComponent(JSON.stringify(item)),
-     }) 
- 
-      return
-    }
- 
- 
- 
-     wx.navigateTo({
-       url: './detail/detail?item=' + encodeURIComponent(JSON.stringify(item)),
-     })
-  },
-  toTitle(e) {
-    console.log('t1', e);
-  },
-  toStatus(e) {
-    console.log('t2', e);
-  },
-  toPoint(e) {
-    console.log('t3', e);
-    this.setData({
-      showShare: true
-    })
-  },
-  toAdd() {
-    wx.navigateTo({
-      url: './add/add',
-    })
-  },
-  /**
-   * @desc : 右上角三个小点 点击回调事件
-   * @date : 2024/2/1 15:49
-   * @author : 王英杰
-   */
-  open(e) {
-     let name = e.detail.name
-     let item = e.detail.item 
-     if(name == 'customerRefund'){  //客户收款
-      wx.navigateTo({
-        url: '/package-sales/pages/order-billing/customer-collection-refund/customer-collection-refund?form='+ encodeURIComponent(JSON.stringify(item)) +'&page=customer-collection' + '&pageIndex=customer-collection',
-      })
-     }
-     if(name == 'customerRefundList'){  //客户退款
-      wx.navigateTo({
-        url: '/package-sales/pages/order-billing/customer-collection/refund-record/refund-record?form='+ encodeURIComponent(JSON.stringify(item)) +'&page=customer-collection',
-      })
-     }
-   
-       
-  
-  },
-  /**
-   * @desc : 校验
-   * @date : 2024/2/1 15:49
-   * @author : 周兴
-   */
-  openValidData(item, name) {
-    console.log('item', item, name, item.customerId);
-    if (!item.customerId) {
-      wx.showToast({
-        title: '无此联系人,或陌生接待',
-        icon: 'none'
-      })
-      return false;
-    }
-    return true;
-  },
 
-  /**
-   * @desc : 查询
-   * @date : 2024/2/1 15:49
-   * @author : 周兴
-   */
-  getData(params) {
-    console.log('fff', params);
   },
 
   /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    //按钮权限
-
-    // let Customer_Follow = common.hasButtonRight(Constants.Customer_Follow) //跟进
-    // let Customer_Follow_Task = common.hasButtonRight(Constants.Customer_Follow_Task) //跟进任务
-    // let Customer_Order = common.hasButtonRight(Constants.Customer_Order) //销售订单
-    // let Customer_Receive = common.hasButtonRight(Constants.Customer_Receive) //客户收款
-    // let Customer_Add = common.hasButtonRight(Constants.Customer_Add) //客户新建
-
-    this.setData({
-      Customer_Follow: true,
-      Customer_Follow_Task: true,
-      Customer_Order: true,
-      Customer_Receive: true,
-      Customer_Add: true
-
-    })
-
-
-
-
-    if (JSON.stringify(options) !== '{}') {
-
-      if (options.frommine) {
-
-        let frommine = JSON.parse(options.frommine)
-        var createtime = this.selectComponent('#createtime');
-        createtime.data.dataDefaultSearch = util.jumpPageDate(frommine.date.value)
-        createtime.data.createTimeType = frommine.date
-
-        let keyType = this.selectComponent('#keyType')
-        let keyTypeList = keyType.data.moreList
-        keyTypeList.forEach(kIt => {
-          if (frommine.keyTypeList) {
-            if (frommine.keyTypeList.some(it => kIt.id === it)) {
-              kIt.infotype = 'info'
-            }
-          }
-        })
-        keyType.setData({
-          moreList: keyTypeList
-        })
-
-        let searchForm = {
-          ...this.data.searchForm
-        }
-        searchForm.keyTypeList = frommine.keyTypeNameList
-
-        this.setData({
-          active: frommine.active,
-          createTimeType: frommine.date,
-          searchForm: searchForm,
-          searchFormNumber: (frommine.keyTypeNameList && frommine.keyTypeNameList.length > 0) ? 1 : null,
-          createTimeSearch: util.jumpPageDate(frommine.date.value),
-          staffIds: frommine.staffId ? [frommine.staffId] : [],
-          staffNames: frommine.staffNames,
-        })
-
-        createtime.init()
-      }
-    } else {
-      // this.searchData()
-    }
-  },
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-    if (this.data.selectflag) {
-      // this.searchData()
-    }
+     * @desc : 查询
+     * @date : 2024/2/1 15:49
+     * @author : 于继渤
+     */
+  getData(params) {
+    return this.excute(this.data.service, this.data.service.selectByCond, params);
   },
 })

+ 2 - 5
package-basic-data/pages/customer-reception/customer-reception.wxml

@@ -9,14 +9,11 @@
   <dk-tabs active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs">    </dk-tabs>
 </van-sticky>
 
-<!-- 暂无数据 -->
-<van-empty wx:if="{{dataList.length<=0}}" description="{{$t['nodata']}}" />
 
 <!-- 列表区 -->
-<dk-list  list="{{dataList}}" footerTag="customerForm" titleCorner="salesChannelName" title="customerName"collectCol="collectAmount"  status="displayStatus" subTitle="makeTime" content="{{contentList}}" contentObj="{{contentObj}}"  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="{{tableData}}" footerTag="cusFromName" title="cusName" collectCol="collectAmount" status="followStatus" subTitle="makeTime" content="{{contentList}}" contentObj="{{contentObj}}" 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">{{$t['noMore']}}~</van-divider>
-<view style="height: 135rpx;"></view>
+<view style="height: 200rpx;"></view>