Browse Source

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

姜永辉 2 năm trước cách đây
mục cha
commit
f31da10797

+ 638 - 92
app.wxss

@@ -22,16 +22,399 @@ page {
 .van-card__title {
   font-size: 16px;
   font-weight: 900;
-}  
+} 
+
+/* 加载更多外部view样式 */
+.load-more {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-top: 12rpx;
+}
 
 /* 加载更多文字 */
 .van-loading__text {
   color: #d9001b !important;
 }
 
+
+/*
+hxd 列表样式
+start
+*/
+/* 卡片整体 */
+.list_card {
+  background-color: #fff;
+  border-radius: 15rpx;
+  border-left: 3px solid #e5e5e9;
+  /* border-right: 2px solid #e5e5e9; */
+  border-bottom: 2px solid #e5e5e9;
+  border-top: 2px solid #e5e5e9;
+  width: 96%;
+  margin-left: 4px;
+  box-shadow: 3px 5px 10px #7C7C7C;
+  margin-top: 18rpx;
+}
+
+/* 卡片总标题 */
+.list_card_title {
+  font-size: 14px;
+  margin-left: 4%;
+  /* height: 60rpx; */
+  overflow: hidden;
+  /*不换行*/
+  white-space: nowrap;
+  /*添加...*/
+  text-overflow: ellipsis;
+  line-height: 2.5;
+  font-weight: bold;
+  width: 100%;
+}
+
+/* 分割线 */
+.list_card_divide_line {
+  border-bottom: 1px dashed #ccc;
+}
+
+/* 一标题 + 一内容 的内容体*/
+.list_card_content {
+  margin-left: 3%;
+  margin-top: 10rpx;
+}
+
+/* 一标题 + 一内容 的标题*/
+.list_card_content_title {
+  font-size: 12px;
+  color: gray;
+  margin: 6rpx;
+  width: 21%;
+  float: left;
+  height: 16px;
+}
+
+/* 一标题 + 一内容 的内容*/
+.list_card_content_content {
+  font-size: 12px;
+  color: black;
+  margin: 6rpx;
+  width: 70%;
+  float: left;
+  min-height: 16px;
+  /* font-weight:bold; */
+}
+
+/* 2标题 + 2内容 的一行*/
+.list_card_content_line {
+  margin-left: 3%;
+  width: 96%;
+  font-size: 12px;
+  margin-bottom: 10rpx;
+}
+
+/* 2标题 + 2内容 的左边标题+内容*/
+.list_card_content_left {
+  width: 52%;
+  float: left;
+  border-right: 1px solid #ccc;
+}
+
+/* 2标题 + 2内容 的右边标题+内容*/
+.list_card_content_right {
+  width: 44%;
+  float: left;
+  margin-left: 12rpx;
+}
+
+/* 2标题 + 2内容 的左边标题*/
+.list_card_content_left_title {
+  font-size: 12px;
+  margin: 6rpx;
+  width: 42%;
+  float: left;
+  color: gray;
+}
+
+/* 2标题 + 2内容 的左边内容*/
+.list_card_content_left_content {
+  margin: 6rpx;
+  /* width: 46%;
+  float: left; */
+  color: black;
+  /* font-weight:bold; */
+}
+
+/* 2标题 + 2内容 的右边标题*/
+.list_card_content_right_title {
+  font-size: 12px;
+  margin: 6rpx;
+  width: 40%;
+  float: left;
+  color: gray;
+}
+
+/* 2标题 + 2内容 的右边内容*/
+.list_card_content_right_content {
+  margin: 6rpx;
+  /* width: 30%;
+  float: left; */
+  color: black;
+  /* font-weight:bold; */
+}
+
+/*
+hxd 列表样式
+end
+*/
+
+.red-label,
+.red-label>view {
+  color: #E4002B !important;
+  font-style: normal;
+  font-weight: bold;
+  font-size: 14px;
+}
+
+.black-label,
+.black-label>view {
+  color: black !important;
+}
+
 .van-cell__value{
   overflow:none !important;
-} 
+}
+
+
+.cell-group-label {
+  display: flex;
+  justify-content: space-between;
+  width: 91%;
+  font-size: 14px;
+  color: #969799;
+  padding: 2vw 3vw;
+  margin-left: 5px;
+}
+
+/** 以下为一览界面 start**/
+.main-class {
+  margin: 10px 32rpx 10px 32rpx;
+  margin-top: 10px;
+  border-radius: 15rpx;
+  box-shadow:2px 2px 5px #e5e5e6;
+}
+
+.main-foot {
+  background: #fff;
+  width: 100%;
+  border-radius: 15rpx 15rpx 0px  0px;
+  background: linear-gradient(180deg, #E2ECFF 0%, #FAFCFF 100%), #fff;
+  background-repeat: no-repeat;
+  background-size: 100% 46px;
+
+}
+
+.table {
+  width: 94%;
+  padding: 10px 3% 10px 3%;
+
+}
+
+.table-row {
+  display: flex;
+  width: 100%;
+  flex-direction: row;
+  margin-top: 6px;
+}
+
+.table-row-center {
+  padding: 8px 5px 8px 5px;
+  font-size: 12px;
+  width: 100%;
+  flex-direction: row;
+  margin-top: 6px;
+
+}
+
+.table-row-item:nth-child(1) {
+  background: #fff;
+  width: 50%;
+
+  /* line-height: 60rpx; */
+
+  /* border-left: 1px #dedede solid; */
+  /* border-top: 1px #dedede solid;
+  border-bottom: 1px #dedede solid;  */
+  padding: 8px 5px 8px 5px;
+  font-size: 12px;
+  /* font-weight: 600; */
+}
+
+.item-red {
+  color: #fe6627;
+}
+
+.telephone-image {
+  color: #fe6627;
+  font-size: 19px;
+  transform: translateY(1vw) rotate(180deg);
+  float: right;
+  margin-top: -5px;
+}
+
+.telephone-image-small {
+  color: #d5d8e0;
+  font-size: 13px;
+  transform: rotate(180deg);
+}
+
+.address-image-small {
+  color: #d5d8e0;
+  font-size: 13px;
+}
+
+.table-row-item:nth-child(2) {
+  display: flex;
+  justify-content: flex-start;
+  background: #fff;
+  width: 50%;
+  word-break: break-all;
+  /* line-height: 60rpx; */
+  padding: 8px 5px 8px 5px;
+  /* border: 1px #dedede solid; */
+  /* border-top: 1px #dedede solid; 
+  border-bottom: 1px #dedede solid;  */
+  font-size: 12px;
+  /* font-weight: 600; */
+
+}
+
+.table-row-item-detail:nth-child(1) {
+  background: #fff;
+  width: 40%;
+  /* line-height: 60rpx; */
+  border-top: 1px #dedede solid;
+  /* border-left: 1px #dedede solid; */
+  /* border-bottom: 1px #dedede solid; */
+  padding: 10px 5px 10px 5px;
+  font-size: 13px;
+  /* font-weight: 600; */
+}
+
+.table-row-item-detail:nth-child(2) {
+  display: flex;
+  justify-content: flex-end;
+  background: #fff;
+  width: 60%;
+  /* line-height: 60rpx; */
+  padding: 10px 5px 10px 5px;
+  /* border: 1px #dedede solid; */
+  border-top: 1px #dedede solid;
+  /* border-bottom: 1px #dedede solid; */
+  font-size: 13px;
+  /* font-weight: 600; */
+
+}
+
+.no-top-border {
+  border-top: 0px !important;
+}
+
+.no-bottom-border {
+  border-bottom: 0px !important;
+}
+
+.first-font-size {
+  font-size: 13px !important;
+  font-weight: bold
+}
+
+.oas-no {
+  width: 50%;
+  font-size: 13px;
+  color: #3b3b3b;
+  text-align: left;
+  font-weight: bold
+}
+
+.oas-status {
+  width: 50%;
+  font-size: 26rpx;
+  color: #1989fa;
+  text-align: right;
+}
+
+.oas-status1 {
+  color: #e97e04;
+}
+
+.oas-copy {
+  width: 5vw;
+  height: 5vw;
+
+  /* margin-left: 20rpx;
+  transform: translateY(5rpx); */
+}
+
+.oas-title {
+  width: 87%;
+  font-size: 13px;
+  color: #3b3b3b;
+  text-align: left;
+  font-weight: bold
+}
+
+.oas-longtitle {
+  width: 80%;
+  font-size: 13px;
+  color: #3b3b3b;
+  text-align: left;
+  font-weight: bold
+}
+
+.oas-shortstatus {
+  width: 19%;
+  font-size: 13px;
+  color: #1989fa;
+  text-align: right;
+}
+
+.oas-all {
+  background: #fff;
+  width: 100%;
+  padding: 8px 5px 8px 5px;
+  font-size: 12px;
+}
+
+.header-no {
+  padding-left: 10rpx;
+  font-size: 13px !important;
+}
+
+.header-status {
+  position: absolute;
+  right: 10px;
+  color: #1989fa;
+}
+
+.table-row-whole {
+  background: #fff;
+  width: 100%;
+  padding: 8px 5px 8px 5px;
+  font-size: 12px;
+}
+
+.footer-info {
+  width: 100%;
+  text-align: right;
+  color: #e97e04;
+  padding-right: 20rpx;
+  font-size: 12px;
+  margin-top: 12px;
+  margin-bottom: 11px;
+}
+
+
+/** 以下为一览界面 end**/
+
 /** 抽屉 start**/
 .popup {
   position: relative;
@@ -48,7 +431,14 @@ page {
   padding-top: 15rpx;
   background: #fff;
   height: 100rpx;
-} 
+}
+
+.pop-button-class{
+  border: none !important;
+  font-size: 16px !important;
+  font-weight: 500 !important;
+  color: #1B365D !important;
+}
 
 .van-swipe-cell__right {
   background: #d9001b;
@@ -60,6 +450,7 @@ page {
   align-items: center;
 }
 
+
 .button-class{
   height: 85rpx !important;
   background: #F8F9FD !important;
@@ -79,12 +470,78 @@ page {
   border-radius: 10rpx !important;
   text-align: left !important;
   margin-bottom: 10rpx;
-  z-index: 999 !important; 
+  z-index: 999 !important;
+  /* overflow: hidden !important;
+  text-overflow: ellipsis !important;
+  white-space: nowrap !important; */
 }
 
 .blue-blue {
   color: #1989fa
-} 
+}
+
+.popup-button-item {
+  /* width: 50%; */
+}
+
+.popup-scroll-view {
+  height: calc(100% - 220rpx);
+}
+
+
+.pop-header {
+  width: 100%;
+  height: 80rpx;
+  background: #d9001b;
+}
+.pop-header-custom {
+  width: 100%;
+  height: 20rpx;
+  background: white;
+}
+.pop-header-x {
+  color: #fff;
+  font-size: 25px;
+  font-weight: 600;
+  line-height: 80rpx;
+  margin-top: 15rpx;
+  float: right;
+  margin-right: 15rpx;
+}
+.pop-header-x-custom {
+  color: black;
+  font-size: 25px;
+  font-weight: 600;
+  line-height: 20rpx;
+  margin-top: 15rpx;
+  float: right;
+  margin-right: 15rpx;
+}
+
+.cell-group {
+  margin-top: 30rpx;
+}
+
+.label-class {
+  max-width: 4rem !important;
+  min-width: 4rem !important;
+}
+
+.pop-footer {
+  width: 100%;
+  position: fixed;
+  bottom: 0;
+}
+
+/** 抽屉 end**/
+
+/** 查询**/
+.van-search {
+  /* padding-left: 0 !important; */
+  /* border: 1rpx solid #D6E4FF;
+  border-radius: 15rpx; */
+}
+
 /** 字体 start20220509 **/
 .font-size16 {
   font-size: 16px !important;  
@@ -107,7 +564,27 @@ page {
 .app-font-weight-bold{
   font-weight: bold !important;
 }
-/** 字体 end**/ 
+/** 字体 end**/
+
+/* 于继渤2022/07/25  列表样式 */
+.table-content{
+  width: 100%;
+}
+.table-content-row{
+  padding: 10px 32rpx 10px 32rpx;
+}
+.table-content-row-font{
+  font-size: 14px;
+  color: #95A8CB; 
+  padding-right: 32rpx;
+  white-space:nowrap;
+}
+.table-content-class{
+  font-size: 13px;
+  font-weight:500;
+  color: #1B365D;
+  word-break: break-all;
+}
 
 /**数量计数器 start**/
 .van-stepper__input{
@@ -147,120 +624,123 @@ page {
 .nomal-label .van-field__label{
   color: #95A8CB !important;
   font-size: 14px !important;
-} 
-
-/**查询框的演示*/
-.van-search__content {
-  background: #F8F9FD;
-  border: 1px solid #D6E4FF;
-  border-radius: 15rpx !important;
-} 
+}
 
-/**提示信息的样式*/
-.van-field__placeholder{
+/**普通label*/
+.nomal-label{
   color: #95A8CB !important;
-  font-weight: normal;
-} 
-/*修改van-grid-item样式*/
-.van-grid-item__content{
-  padding-left: 0 !important;
-  padding-right: 0 !important;
-}
-.van-swipe-cell__right {
-  background: #1B365D !important;
+  font-size: 14px !important;
 }
 
-.van-button{
-  z-index: 999 !important;
-}
-.main-class {
-  margin: 10px 32rpx 10px 32rpx;
-  margin-top: 10px;
-  border-radius: 15rpx;
-  box-shadow:2px 2px 5px #e5e5e6;
+/**弹出pop样式*/
+.dk-popup {
+  background-color: transparent !important;
+  overflow-x: hidden;
 }
 
-.main-foot {
-  background: #fff;
-  width: 100%;
-  border-radius: 15rpx 15rpx 0px  0px;
-  background: linear-gradient(180deg, #E2ECFF 0%, #FAFCFF 100%), #fff;
-  background-repeat: no-repeat;
-  background-size: 100% 46px;
-
+/**pop弹出框的表头样式*/
+.special-topic {
+  width: 96%;
+  height: 223rpx;
+  display: flex;
+  padding-left: 4%;
+  /* 从最下面开始布局 */
+  align-items: center;
+  background: #F8F9FD;
+  border-radius: 30rpx 30rpx 0px 0px !important;
 }
 
-.table {
-  width: 94%;
-  padding: 10px 3% 10px 3%;
-
+/**pop弹出框的表头内容样式*/
+.special-topic-content {
+  width:170rpx;
 }
 
-.table-row {
+/**pop弹出框的表头图片样式*/
+.goods-pop-image{
+  width: 163rpx;
+  height: 163rpx;
   display: flex;
-  width: 100%;
-  flex-direction: row;
-  margin-top: 0px;
+  align-items: center;
+  text-align: center;
+  border: 1px solid #606EB2;
+  border-radius: 15rpx !important;
+  margin-bottom: 127rpx;
 }
 
-.table-row-center {
-  padding: 8px 5px 8px 5px;
-  font-size: 12px;
-  width: 100%;
-  flex-direction: row;
-  margin-top: 6px;
-
+/**pop弹出框的表头标题样式*/
+.special-topic-title{
+  width: 90%;
+  height: 165rpx;
+  padding: 1rpx 0 0 20rpx !important;
 }
 
-.table-row-item:nth-child(1) {
-  background: #fff;
-  width: 50%;
-  padding: 8px 5px 8px 5px;
-  font-size: 12px;
+/**pop弹出框的内容样式*/
+.pop-content-class{
+  padding: 2rpx 28rpx 52rpx 28rpx;
+  background: #FFFFFF;
+  z-index: 99;
 }
 
-.item-red {
-  color: #fe6627;
+/**cell值颜色**/
+.dk-cell-value-class {
+  text-align: left !important;
+  font-size: 13px !important;
+  color: #1B365D !important;
+  font-weight: normal;
 }
-
-.table-content{
-  width: 100%;
+/**cell空值颜色**/
+.dk-cell-value-empty-class{
+  text-align: left !important;
+  font-size: 13px !important;
+  color: #95A8CB !important;
 }
-.table-content-row{
-  padding: 10px 32rpx 10px 32rpx;
+
+/**cell值颜色**/
+.dk-cell-value-pop-class {
+  text-align: right !important;
+  font-size: 13px !important;
+  color: #1B365D !important;
+  font-weight: normal;
 }
-.table-content-row-font{
-  font-size: 14px;
-  color: #95A8CB; 
-  padding-right: 32rpx;
-  white-space:nowrap;
+
+/**查询框的演示*/
+.van-search__content {
+  background: #F8F9FD;
+  border: 1px solid #D6E4FF;
+  border-radius: 15rpx !important;
 }
-.table-content-class{
-  font-size: 13px;
-  font-weight:500;
-  color: #1B365D;
-  word-break: break-all;
+.van-field__placeholder{
+  color: #95A8CB !important;
 }
-/* 共通popup样式 */
-.function-pop-class{
-  /* padding-bottom:130rpx !important; */
-  width:100%;
-  z-index:10;
-  border-radius: 30rpx 30rpx 0rpx 0rpx !important;
+
+.tag-text{
+  overflow: hidden !important;
+  text-overflow: ellipsis !important;
+  white-space: nowrap;
+  word-wrap: break-all;
+  width: 100%;
+  height: 44rpx;
+  margin-top: -10rpx;
+  margin-bottom: -10rpx;
 }
-.red-label,
-.red-label>view {
-  color: #E4002B !important;
-  font-style: normal;
-  font-weight: bold;
-  font-size: 14px;
+
+.selected-sku-text{
+  overflow: hidden !important;
+  text-overflow: ellipsis !important;
+  white-space: nowrap;
+  word-wrap: break-all;
+  width: 100%;
+  height: 50rpx;
+  margin-top: -2rpx;
+  margin-bottom: -2rpx;
 }
+
 /**card的外部样式*/
 .dk-card-outer-class{
   margin: 10px 32rpx 10px 32rpx;
   margin-top: 10px;
   border-radius: 15rpx;
-  /* box-shadow:2px 2px 5px #e5e5e6; */
+  box-shadow:2px 2px 5px #e5e5e6;
 }
 /**card的样式*/
 .dk-card-class{
@@ -268,4 +748,70 @@ page {
   box-shadow: 0rpx 10rpx 20rpx rgba(225, 229, 238, 0.6);
   border-radius: 15rpx !important;
   padding: 5rpx;
-}
+}
+
+/**提示信息的样式*/
+.van-field__placeholder{
+  color: #95A8CB !important;
+  font-weight: normal;
+}
+
+/**功能pop*/
+.function-pop-class{
+  /* height:40% !important; */
+  padding-bottom:130rpx !important;
+  width:100%;
+  z-index:10;
+  border-radius: 30rpx 30rpx 0rpx 0rpx !important;
+  padding-top: 20rpx; 
+}
+
+/**功能pop文字样式*/
+.function-pop-text-class{
+  font-size: 12px !important;
+  font-weight: 400 !important;
+  color: #1B365D !important;
+}
+
+/**功能菜单的图标样式*/
+.function-pop-image{
+  width: 80rpx;
+  height: 80rpx;
+  display: flex;
+  align-items: center;
+  text-align: center;
+  margin-bottom: 27rpx;
+}
+
+.function-cell-group {
+  margin-top: 10rpx;
+  width: 94%;
+  margin-left: 3%;
+}
+
+.cell-value-class{
+  font-style: normal;
+  font-weight: 400;
+  font-size: 14px;
+  color: #1B365D !important;
+}
+
+.cell-value-class-no-select{
+  font-style: normal;
+  font-weight: 400;
+  font-size: 14px;
+  color: #95A8CB !important;
+}
+
+/*修改van-grid-item样式*/
+.van-grid-item__content{
+  padding-left: 0 !important;
+  padding-right: 0 !important;
+}
+.van-swipe-cell__right {
+  background: #1B365D !important;
+}
+
+.van-button{
+  z-index: 999 !important;
+}

+ 39 - 3
components/dkbase/dk-save-bottom/dk-save-bottom.js

@@ -5,6 +5,8 @@
  * 编辑履历:
  *		作者				日期					版本				修改内容
  *		于继渤		  	2022-5-05			1.00		 底部工具栏-保存
+  *		作者				日期					版本			修改内容
+ *		姜永辉     2022-05-05	  1.01		   	  底部工具栏-保存
  *******************************************************************************/
 
 Component({
@@ -21,6 +23,22 @@ Component({
         submit: '保存'
       }
     },
+    checked: {  // 自动入库办理
+      type: Boolean,
+      value: true,
+    },
+    showcheckbox: {  // 是否显示出库办理
+      type: Boolean,
+      value: true,
+    },
+    rightButtonFlag:{
+        type: Boolean,
+        value: true,
+    },
+    leftButtonFlag:{
+        type: Boolean,
+        value: true,
+    },
     submitFlag: {  //按钮显示隐藏
       type: Boolean,
       value: true,
@@ -33,9 +51,9 @@ Component({
       type: Boolean,
       value: false,
     },
-    bottomClass:{ //自定义按钮  
+    purchasePriceFlag:{ //敏感信息隐藏
       type: Boolean,
-      value: false,
+      value: true,
     },
     totallength: { //合计数量
       type: String,
@@ -56,7 +74,16 @@ Component({
     disabledFlag:{
       type: Boolean,
       value: false,
-    }
+    },
+    allCleanName: { //左侧按钮文本属性
+      type: String,
+      default: ''
+    },
+    allSubmitName: { //右侧侧按钮文本属性
+      type: String,
+      default: ''
+    },
+    
   },
 
   options: {
@@ -70,6 +97,7 @@ Component({
    */
   data: {
     allCheck: true,
+    checked: true,
   },
 
   /**
@@ -87,6 +115,14 @@ Component({
    * 组件的方法列表
    */
   methods: {
+    onCheckboxChange(event) {
+      this.setData({
+        checked: event.detail
+      });
+      this.triggerEvent('onCheckboxChange', {
+        checked: event.detail
+      })
+    },
     /**
      * 确定
      */

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

@@ -395,7 +395,62 @@
 
 
 
+  <view style="padding:52rpx 34rpx 61rpx 43rpx; display: flex;" wx:if="{{flagTypeName ==='purchase-orders-edit1'}}">
 
+<view style="width:50%;height:88rpx">
+  <view wx:if="{{purchasePriceFlag}}" style="color: #CAA977;font-size: 30rpx;line-height: 40rpx;">
+    合计金额:
+  </view>
+  <dk-cell wx:if="{{purchasePriceFlag}}" contentFontSize="16" height="44rpx" fontWeight="600" left="0rpx" contentColor="#CAA977" title="" content="{{ totallength}}"></dk-cell>
+</view>
+
+<!-- 保存确定区域 -->
+<view style="width: 50%; display: flex;">
+    <view  wx:if="{{!rightButtonFlag}}"  style="border-radius: 15rpx;width: 196rpx; height: 88rpx;font-size: 32rpx;line-height: 40rpx;">
+    
+    </view>
+  <view  style="border-radius: 15rpx;width:50%; height: 88rpx;font-size: 32rpx;line-height: 40rpx;">
+   
+    <van-button disabled="{{disabledFlag}}" loading="{{disabledFlag}}" plain round size="large" color=""   custom-style="height:88rpx;background:#ffffff;border-radius: 15rpx;color:#1B365D;border: solid 2rpx #1B365D;font-size: 16px; font-weight: bold;" bind:click="submit" type="info">暂存
+    </van-button>
+  </view>
+  <view wx:if="{{leftButtonFlag && rightButtonFlag}}" style="width: 10%;"></view>
+
+  <view  wx:if="{{rightButtonFlag}}"  style="border-radius: 15rpx;width: 50%; height: 88rpx;font-size: 32rpx;line-height: 40rpx;">
+    <van-button wx:if="{{leftButtonFlag}}" disabled="{{disabledFlag}}"  round  size="large" color="#1B365D" custom-style="height:88rpx;" bind:click="allClean" type="default">提交
+    </van-button>
+  </view>
+</view>
+</view>
+
+
+<view style="padding:52rpx 34rpx 61rpx 43rpx; display: flex;" wx:if="{{flagTypeName ==='purchase-orders-offer'}}">
+
+<view style="width:50%;height:88rpx">
+  <view wx:if="{{purchasePriceFlag}}" style="color: #CAA977;font-size: 30rpx;line-height: 40rpx;">
+    合计金额:
+  </view>
+  <dk-cell wx:if="{{purchasePriceFlag}}" contentFontSize="16" height="44rpx" fontWeight="600" left="0rpx" contentColor="#CAA977" title="" content="{{ totallength}}"></dk-cell>
+</view>
+
+<!-- 保存确定区域 -->
+<view style="width: 50%; display: flex;">
+    <view  wx:if="{{!rightButtonFlag}}"  style="border-radius: 15rpx;width: 196rpx; height: 88rpx;font-size: 32rpx;line-height: 40rpx;">
+    
+    </view>
+  <view  style="border-radius: 15rpx;width: 50%; height: 88rpx;font-size: 32rpx;line-height: 40rpx;">
+   
+    <van-button disabled="{{disabledFlag}}" loading="{{disabledFlag}}" plain round size="large" color=""   custom-style="height:88rpx;background:#ffffff;border-radius: 15rpx;color:#1B365D;border: solid 2rpx #1B365D;font-size: 16px; font-weight: bold;" bind:click="submit" type="info">暂存
+    </van-button>
+  </view>
+  <view wx:if="{{leftButtonFlag && rightButtonFlag}}" style="width: 10%;"></view>
+
+  <view  wx:if="{{rightButtonFlag}}"  style="border-radius: 15rpx;width: 50%; height: 88rpx;font-size: 32rpx;line-height: 40rpx;">
+    <van-button wx:if="{{leftButtonFlag}}" disabled="{{disabledFlag}}"  round  size="large" color="#1B365D" custom-style="height:88rpx;" bind:click="allClean" type="default">提交
+    </van-button>
+  </view>
+</view>
+</view>
 
 </view>
 
@@ -456,4 +511,16 @@
     </view>
   </view>
 
+  <view wx:if="{{flagTypeName ==='purchase-order-detail'}}" style="display: flex; padding:35rpx 34rpx 62rpx 34rpx;justify-content: center;align-items: center;">
+    <view style="width:61%">
+      <dk-cell height="46rpx" spaceWidth="1rpx" left="0" fontSize="15" contentColor="#CAA977" fontWeight="600" title="合计金额:" content="{{totallength}}"></dk-cell>
+    </view>
+    <view style="width: 4%;"></view>
+    <view style="width:35%;">
+      <van-button size="large" round color="#1B365D" custom-style="height:88rpx;" bind:click="allClean" type="default">关闭
+      </van-button>
+    </view>
+  </view>
+  
+
 </view>

+ 3 - 2
components/dkbusiness/dk-muti-dropdown-item/dk-muti-dropdown-item.js

@@ -193,7 +193,7 @@ Component({
     setCheck() {
      
       let ids = this.data.ids
-      console.log(ids)
+   
       let dataList = [...this.data.datalist]
       this.data.datalist.forEach(it => {
         if (ids.some(it2 => it2 == it.id)) {
@@ -216,6 +216,7 @@ Component({
         param.cpId = app.globalData.user.cpId
         param.sysId = app.globalData.user.sysId
         param.orgId = app.globalData.user.orgId
+        param.ascpId = app.globalData.user.ascpId
         param.docName = this.data.docName
       }
 
@@ -251,7 +252,7 @@ Component({
      * 勾选或者勾选
      */
     checkItem: function (e) {
-      console.log('勾选或者勾选', e)
+     
       let datalist = this.data.datalist
       let finallist = this.data.finallist
       let id = e.target.dataset.id

+ 35 - 35
components/dkbusiness/dk-muti-dropdown-item/dk-muti-dropdown-item.wxml

@@ -1,39 +1,39 @@
 <!-- 弹窗 -->
 <van-popup show="{{show}}" position="right" z-index="9999999" custom-style="overflow-x:hidden;width: 75%;z-index:9999999;height:100%;" bind:close="onClose">
  
-  <van-sticky scroll-top="0">
-    <view wx:if="{{Top_Height_Flag}}" style="height: 21vw;background: #fff;"></view>
-    <van-search custom-class="search-class" shape="round" model:value="{{ condition }}" input-class="background:#c8c8c8;" placeholder="搜索" bind:change="onChange_input" bind:blur="blur_input" />
-    <view class="choose_label" >
-      {{label_title}}
-    </view>
-  </van-sticky>
- 
-  <view class="root" style="height:calc(100% - 120rpx)">
-    <view class="scroll_search" style="overflow-x:hidden;">
-      <scroll-view class="scroll_position"  scroll-x="{{false}}" scroll-y enable-back-to-top>
-        <view wx:if="{{Top_Height_Flag}}" style="height: 21vw;background: #fff;"></view>
-        <view wx:for="{{datalist}}" class="checkbos_padding" data-index="{{index}}" data-id="{{item.id}}">
-          <van-cell custom-class="cell-class" border="{{false}}" title-width="280rpx"  clickable="{{true}}" bind:click="checkItem"  data-item="{{item.checked}}"  data-index="{{index}}" data-id="{{item.id}}">
-            <view Slot="title">
-              <van-checkbox other-style="display:flex;" use-icon-slot shape="square" value="{{ item.checked }}" data-index="{{index}}"  data-id="{{item.id}}">
-              <view style="display:flex;align-items:center;">
-                <image style="width: 26rpx;height:26rpx;" slot="icon" src="{{ item.checked ? '../../static/image/radio-check.png' : '../../static/image/radio-no-checked.png' }}" />
-                <view style="margin-left:10rpx;font-size: 13px;{{item.checked?'color:#1B365D':'color:#95A8CB'}}">{{item.name}}</view>
-              </view>
-              </van-checkbox>
-            </view>
-          </van-cell>
-        </view>
-      </scroll-view>
-    </view>
-  </view>
-  <view class="popup-button">
-    <view >
-      <van-button custom-style="border-radius: 15rpx;width:189rpx !important;" plain color="#1B365D"  catchtap="reset">重置</van-button>
-    </view>
-    <view >
-      <van-button custom-style="border-radius: 15rpx;width:274rpx  !important;" color="#1B365D"  catchtap="commit">确定</van-button>
-    </view>
-  </view>
+ <van-sticky scroll-top="0">
+   <view wx:if="{{Top_Height_Flag}}" style="height: 21vw;background: #fff;"></view>
+   <van-search custom-class="search-class" shape="round" model:value="{{ condition }}" input-class="background:#c8c8c8;" placeholder="搜索" bind:change="onChange_input" bind:blur="blur_input" />
+   <view class="choose_label" >
+     {{label_title}}
+   </view>
+ </van-sticky>
+
+ <view class="root" style="height:calc(100% - 120rpx)">
+   <view class="scroll_search" style="overflow-x:hidden;">
+     <scroll-view class="scroll_position"  scroll-x="{{false}}" scroll-y enable-back-to-top>
+       <view wx:if="{{Top_Height_Flag}}" style="height: 21vw;background: #fff;"></view>
+       <view wx:for="{{datalist}}" class="checkbos_padding" data-index="{{index}}" data-id="{{item.id}}">
+         <van-cell custom-class="cell-class" border="{{false}}" title-width="280rpx"  clickable="{{true}}" bind:click="checkItem"  data-item="{{item.checked}}"  data-index="{{index}}" data-id="{{item.id}}">
+           <view Slot="title">
+             <van-checkbox other-style="display:flex;" use-icon-slot shape="square" value="{{ item.checked }}" data-index="{{index}}"  data-id="{{item.id}}">
+             <view style="display:flex;align-items:center;">
+               <image style="width: 26rpx;height:26rpx;" slot="icon" src="{{ item.checked ? '../../static/image/radio-check.png' : '../../static/image/radio-no-checked.png' }}" />
+               <view style="margin-left:10rpx;font-size: 13px;{{item.checked?'color:#1B365D':'color:#95A8CB'}}">{{item.name}}</view>
+             </view>
+             </van-checkbox>
+           </view>
+         </van-cell>
+       </view>
+     </scroll-view>
+   </view>
+ </view>
+ <view class="popup-button">
+   <view >
+     <van-button custom-style="border-radius: 15rpx;width:189rpx !important;" plain color="#1B365D"  catchtap="reset">重置</van-button>
+   </view>
+   <view >
+     <van-button custom-style="border-radius: 15rpx;width:274rpx  !important;" color="#1B365D"  catchtap="commit">确定</van-button>
+   </view>
+ </view>
 </van-popup>

+ 1 - 3
package2/pages/customer-list/customer-list.js

@@ -685,9 +685,7 @@ Page({
     })
  
 
-    let staffIdsTemp = []
-    staffIdsTemp.push(app.globalData.user.userId) //
-    this.getGoodsSpecs()
+ 
 
     if (JSON.stringify(options) !== '{}') {
 

+ 163 - 310
package2/pages/customer-list/detail/detail.js

@@ -63,21 +63,21 @@ Page({
       createtime: '从未交易',
       createtimeflg: false,
       tags: [{
-        text: '超大型1000-2000人',
-        class: '#00CED1',
-      },
-      {
-        text: 'B类',
-        class: '#00CED1',
-      },
-      {
-        text: '采购',
-        class: '#00CED1',
-      },
-      {
-        text: '分销',
-        class: '#00CED1',
-      },
+          text: '超大型1000-2000人',
+          class: '#00CED1',
+        },
+        {
+          text: 'B类',
+          class: '#00CED1',
+        },
+        {
+          text: '采购',
+          class: '#00CED1',
+        },
+        {
+          text: '分销',
+          class: '#00CED1',
+        },
       ],
       activeNames_goods: [],
       activeNames_goods1: [],
@@ -232,166 +232,159 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onLoad: function (options) {
-    //订单新建
-    let ORDER_Add = common.hasButtonRight(Constants.ORDER_Add)
-    //添加按钮权限
-    let Customer_Collection_Add = common.hasButtonRight(Constants.Customer_Collection_Add)
-    this.setData({
-      ORDER_Add: ORDER_Add,
-      Customer_Collection_Add: Customer_Collection_Add
-    })
-    if (app.globalData.user == undefined) { //如果 user为空 跳回登录页再重新进入本页面获取
-      wx.reLaunch({
-        url: 'pages/login/login?loginType=7',
-      })
-      return
-    }
-
-    wx.qy.getContext({
-      success: function (res) {
 
-      }, fail(err) {
-
-      }
-    })
-
-    let Customer_Edit = common.hasButtonRight(Constants.Customer_Edit) //客户编辑
-    this.setData({
-      Customer_Edit: Customer_Edit,
-    })
-    //拿到列表的客户id 去查询明细
-    if (options.ID) {
-      let customerId = options.ID
-      this.setData({
-        customerId
-      })
-      this.getSumData(this.data.customerId) //获取汇总数据  只调一次 故放到onLoad
-    } else {
-      // 从企业微信工具栏中进入的
-      this.getCurExternalContact(app.globalData.user.cpId)
+    let form = {
+      saleStatus: "客成状态-成交",
+      customerFromName: "选用1",
+      customerName: "88888888888",
+      customerPhone: "18888888881",
+      addressFull: "广东省深圳市福田区这是啥科技(赛格康乐大厦店)88888888888",
+      reportUserName:"无库无ERP00001",
+      orgName:"北海富安居店",
+      toiletCountName:"别墅",
+      fitupTypeName:"精装升级",
+      houseTypeName:"出租房",
+      fitupStyleName:"中式",
+      ageCompositionName:"50后",
+      decisionMakerName:"驻店设计师",
     }
-  },
-  /** 
-  * 通过cpid 外部联系人userid 查询客户
-  * @param {*} cpid 
-  */
-  getCurExternalContact(cpid) {
-    let that = this
-    that.setData({
-      loading: true,
-    })
-    // 需要从特定入口进入页面才可调用 
-    // 获取当前外部联系人userid
-    wx.qy.getCurExternalContact({
-      success: function (res) {
-        var userId = res.userId //返回当前外部联系人userId
-        let param = {
-          qvExternalUserid: userId,
-          cpId: cpid,
-        }
-        api.request(Constants.SALE_CUSTOMER_API + 'select_customer_detail', 'POST', param).then(res => {
-          that.setData({
-            loading: false,
-          })
-          if (res.data.code === 200) {
-            that.setData({
-              customerId: res.data.data.customerId
-            })
-            ////获取汇总数据   
-            that.getSumData(that.data.customerId)
-            that.getData(that.data.customerId)
-            that.getFeeData(that.data.customerId) //查询收款数据
-            that.getRefundData(that.data.customerId)
-          }
-
-        })
+    let SumDataList = {
+      nonOutAmount: 999,
+      orderAmount: 58005,
+      orderQuantity: 5,
+      outAmount: 57006,
+      outQuantity: 4,
+      rejectAmount: 1998,
+      rejectQuantity: 14,
+      sumReceipt: 15442,
+      usablePrestore: 14443
+    }
+    let customerFollowList = [{
+        weekTime: 1,
+        createTime: '2022 06-12 12:15',
+        data: [{
+          followType: '电话拜访',
+          followStatus: '普通跟进',
+          followUserName: '王丽丽',
+          followData: '客户说 想要智能马桶'
+        }]
       },
-      fail: function (res) {
-        that.setData({
-          loading: false,
-        })
+      {
+        weekTime: 2,
+        createTime: '2022 06-12 12:15',
+        data: [{
+          followType: '电话拜访',
+          followStatus: '普通跟进',
+          followUserName: '王丽丽',
+          followData: '客户说 想要智能马桶'
+        }]
       }
-    });
-  },
-  /**
-   * @desc : 小程序客户列表分页查询  获取基础数据和 跟进记录数据
-   * @author : 王英杰
-   * @date : 2022/5/23 15:16
-   */
-  getData(id) {
+    ]
+    let orderList_price = [{
+      orderNo: 'FQ202207061423001',
+      orgName: '佛山居然店',
+      staffName: '王丽丽',
+      sumAmount: '7999',
+      categoryQuantity: '145',
+      sumQuantity: 74,
+      orderItemVOList: [{
+        iconThumPath: '',
+        titleTag: 'HEGII',
+        title: 'HE009',
+        flag: false,
+        desc: 'HE009一体盖板',
+        priceSale: 5999,
+        itemQuantity: 1,
+        remarks: '非标备注:张先生北京市海淀区万泉路街道...',
+      }]
+    }]
+    let orderList_ok = [{
+      orderNo: 'FQ202207061423001',
+      orgName: '佛山居然店',
+      staffName: '王丽丽',
+      tSumGoodsAmount: '7999',
+      sumOutAmount: '145',
+      sumReceiptAmount: 74,
+      receivable: 72,
+      sumRejectAmount: 11,
+      orderItemVOList: [{
+        iconThumPath: '',
+        titleTag: 'HEGII',
+        title: 'HE009',
+        flag: false,
+        desc: 'HE009一体盖板',
+        priceSale: 5999,
+        itemQuantity: 1,
+        remarks: '非标备注:张先生北京市海淀区万泉路街道...',
+      }]
+    }]
+    let orderList_out = [{
+      rejectNo: 'FQ202207061423001',
+      orgName: '佛山居然店',
+      staffName: '王丽丽',
+      makingTime: '2022-09-11',
+      sumRejectAmount: '145',
+      categoryQuantity: 74,
+      sumRejectQuantity: 11,
+      rejectItemVOList: [{
+        iconThumPath: '',
+        titleTag: 'HEGII',
+        title: 'HE009',
+        flag: false,
+        desc: 'HE009一体盖板',
+        priceSale: 5999,
+        itemQuantity: 1,
+        remarks: '非标备注:张先生北京市海淀区万泉路街道...',
+      }]
+    }]
+    let activeNames_goods = []
+    let listFee = [{
+      receiptNo: 'CR-QZHJ-BFJ-202401050RM1',
+      opCreateTime:'2024-01-05 13:03:14',
+      orgName:'北海富安居店',
+      staffName:'无库无ERP00001',
+      docCode:'客户收款',
+      sumAmount:'999',
+      sumRefundAmount:'999',
+    },{
+      receiptNo: 'CR-QZHJ-BFJ-202401050RM1',
+      opCreateTime:'2024-01-05 13:03:14',
+      orgName:'北海富安居店',
+      staffName:'无库无ERP00001',
+      docCode:'客户收款',
+      sumAmount:'999',
+      sumRefundAmount:'999',
+    }]
+    let listRefund = [{
+      refundNo: 'FQ202207061423001',
+      orgName: '佛山居然店',
+      staffName: '王丽丽',
+      opCreateTime: '2022-09-11',
+      docCode: '退款',
+      refundAmount: -74, 
+    },{
+      refundNo: 'FQ202207061423001',
+      orgName: '佛山居然店',
+      staffName: '王丽丽',
+      opCreateTime: '2022-09-11',
+      docCode: '退款',
+      refundAmount: -74, 
+    }]
     this.setData({
-      loading: true
-    })
-    let param = {
-      customerId: id,
-    }
-    param.cpId = app.globalData.user.cpId
-    api.request(Constants.SALE_CUSTOMER_API + 'select_customer_detail', 'POST', param).then(res => {
-      this.setData({
-        loading: false
-      })
-      if (res.data.code === 200) {
-        let data = res.data.data
-        //跟进人拼接
-        let tList = [];
-        let list = res.data.data; //后台返回数据
-        tList = tList.concat(list)
-        tList.forEach(it => {
-          let tempNames = []
-          it.followUserName.forEach(item => {
-            tempNames.push(item.userName)
-          })
-          it.userName = tempNames.join(',')
-        })
-        //end here
-        let form = this.data.form
-        let customerFollowList_ = []
-        customerFollowList_ = res.data.data.customerFollowList
-        let followList = []
-        for (let i = 0; i < customerFollowList_.length; i++) {
-          if (customerFollowList_[i].followId) {
-            followList.push(customerFollowList_[i])
-          }
-        }
-        // let fileList = []
-        // if (data.annexPathsList && data.annexPathsList.length > 0) {
-        //   data.annexPathsList.forEach(item => {
-        //     fileList.push({
-        //       url: config.server_img_http + item.url,
-        //       FilePath: item.url,
-        //       deletable: true
-        //     })
-
-        //   })
-        // }
-        this.setData({
-          fileList: data.annexPathsList,
-          form: data,
-          customerFollowList: followList.length > 0 ? this.classify(followList) : [],
-        })
-        if (this.data.customerFollowList.length > 0) {
-          let that = this
-          setTimeout(() => {
-            wx.createSelectorQuery().select('#time0').boundingClientRect(function (rect) {
-              that.setData({
-                timeWidth: rect.width
-              })
-            }).exec()
-            wx.createSelectorQuery().select('#xian0').boundingClientRect(function (rect) {
-              that.setData({
-                xianWidth: rect.width
-              })
-            }).exec()
-            wx.createSelectorQuery().select('#kuang0').boundingClientRect(function (rect) {
-              that.setData({
-                kuangHeight: rect.height
-              })
-            }).exec()
-          }, 200)
-        }
-      }
+      form,
+      SumDataList,
+      customerFollowList,
+      orderList_price,
+      activeNames_goods,
+      orderList_ok,
+      orderList_out,
+      listFee,
+      listRefund
     })
+
   },
+ 
+ 
   /**
    * 把创建时间相同的跟进记录放入到一个item 然后扔到list
    * @param {*} arr 
@@ -478,140 +471,9 @@ Page({
     return goodsList
   },
 
-  /**
-   * 得到客户对应的收款数据
-   * @param {*} id 
-   */
-  getFeeData(id) {
-    this.setData({
-      loading: true
-    })
-    let param = {}
-    param.customerId = id
-    api.request(Constants.ORDER_RECEIPT_API + 'list_by', 'POST', param).then(res => {
-      this.setData({
-        loading: false
-      })
 
-      if (res.data.code === 200) {
-        let listFee_ = res.data.data.list
-        let listFee = []
-        for (let i = 0; i < listFee_.length; i++) {
-          if (listFee_[i].docCode == '客户收款' || listFee_[i].docCode == '客户取款') {
-            listFee.push(listFee_[i])
-          }
-        }
-        this.setData({
-          listFee: listFee
-        })
-      }
-    })
-  },
-  getRefundData(id) {
-    this.setData({
-      loading: true
-    })
-    let param = {}
-    param.customerId = id
-    param.cpId =app.globalData.user.cpId
-    param.userId =app.globalData.user.userId
-    api.request(Constants.ORDER_REFUND_ITEM_API + 'select_report_by_cond', 'POST', param).then(res => {
-      this.setData({
-        loading: false
-      })
-
-      if (res.data.code === 200) {
-        
-        this.setData({
-          listRefund: res.data.data.list
-        })
-      }
-    })
-  },
-  /**
-   * 得到客户对应的订单数据
-   * @param {*} id 
-   */
-  getOrderData(id, currentPage) {
-    this.setData({
-      loading: true
-    })
-    let param = {}
-    param.customerId = Number(id)
-    param.pageSize = this.data.pageInfo.pageSize
-    param.pageCurrent = currentPage
-    api.request(Constants.SALE_ORDER_API + 'select_order_by_customer_id', 'POST', param).then(res => {
-      this.setData({
-        loading: false
-      })
-      if (res.data.code === 200) {
-        let orderList_ = res.data.data.list
-        let orderList_ok = [] //成交订单
-
-        orderList_ok = orderList_.filter(item => {
-          return item.orderType == 2 && item.orderStatus == '订单状态-通过'
-        })
 
 
-        orderList_ok.forEach(element => {
-          element.orderItemVOList = this.setOrderItem(element.orderItemVOList)
-        });
-        if (currentPage == 1) {
-          let pageInfo = this.data.pageInfo
-          pageInfo.currentPage = currentPage
-          pageInfo.lastPage = Number((res.data.data.total + pageInfo.pageSize - 1) / pageInfo.pageSize)
-
-          this.setData({
-            orderList_ok: orderList_ok,
-            pageInfo
-          })
-
-        } else {
-          let pageInfo = this.data.pageInfo
-          pageInfo.currentPage = currentPage
-          //拼接数据concat
-          this.setData({
-            orderList_ok: this.data.orderList_ok.concat(orderList_ok),
-            pageInfo
-          })
-        }
-
-
-
-      }
-    })
-  },
-  /**
-   * 得到客户对应的销售退货数据
-   * @param {*} id 
-   */
-  getOrderOutReject(id) {
-    this.setData({
-      loading: true
-    })
-    let param = {}
-    param.customerId = id
-    api.request(Constants.CUSTOMER_ORDER_OUT_REJECT + 'select_oreder_out_reject_by_customer_id', 'POST', {
-      customerId: Number(id)
-    }).then(res => {
-      this.setData({
-        loading: false
-      })
-      if (res.data.code === 200) {
-        let orderList_ = res.data.data.list
-        let orderList_out = [] //销售退货
-        for (let i = 0; i < orderList_.length; i++) {
-          orderList_out.push(orderList_[i])
-        }
-        orderList_out.forEach(element => {
-          element.rejectItemVOList = this.setOrderItem(element.rejectItemVOList)
-        });
-        this.setData({
-          orderList_out
-        })
-      }
-    })
-  },
   /**
    * @desc : 切换tab比起爱你
    * @author : 周兴
@@ -647,13 +509,6 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-    if (this.data.customerId == "" || this.data.customerId == null || this.data.customerId == undefined) {
-
-    } else {
-      this.getData(this.data.customerId)
-      this.getFeeData(this.data.customerId) //查询收款数据
-      this.getRefundData(this.data.customerId)
-    }
 
 
   },
@@ -784,10 +639,8 @@ Page({
         this.getFeeData(that.data.customerId) //查询收款数据
         this.getRefundData(that.data.customerId)
       },
-      fail: (res) => {
-      },
-      complete: (res) => {
-      }
+      fail: (res) => {},
+      complete: (res) => {}
     })
 
   },

+ 8 - 7
package2/pages/customer-list/detail/detail.wxml

@@ -14,7 +14,7 @@
           <van-image width="20" height="20" src="/static/img/user.png" />
           <dk-text style="white-space:nowrap;margin-right: 20rpx;padding-left: 8rpx;" fontWeight="nomal" value="{{form.customerName}}"></dk-text>
         </view>
-        <view data-item="{{item}}" wx:if="{{Customer_Edit}}" catchtap="toEdit">
+        <view data-item="{{item}}"  catchtap="toEdit">
           <van-image custom-class="image-class" src="/static/img/edit.png" />
         </view>
       </view>
@@ -148,7 +148,8 @@
 
     <view class="number">
       <view class="order-summary">
-        <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{SumDataList.rejectAmount}}"></dk-cell>
+        <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" 
+        content="{{SumDataList.rejectAmount}}"></dk-cell>
       </view>
       <view class="oreder-summary-detail">
         退货({{SumDataList.rejectQuantity}}单)
@@ -197,16 +198,16 @@
           <view style="font-size: 14px;display: flex; margin-top:34rpx; ">
             <view style="padding-left:20px;flex:1.1;color:#1B365D;white-space: nowrap;">
               <!-- 下次跟进时间:{{form.customerFollowList[0].nextFollowTime?form.customerFollowList[0].nextFollowTime:''}}</view> -->
-              下次跟进时间:{{form.nextFollowTime?form.nextFollowTime:''}}
+              下次跟进时间: 2024年1月24日
             </view>
-            <view style="flex:1;color:#1B365D;text-align:right;margin-right:36rpx;">跟进 {{form.customerFollowList.length}} 次</view>
+            <view style="flex:1;color:#1B365D;text-align:right;margin-right:36rpx;">跟进 3 次</view>
           </view>
           <!-- 
           <view style="font-size: 12px;word-break: break-word; padding-left:20px;;color:#1B365D;">
             下次跟进计划:{{form.customerFollowList[0].nextFollowPlan?form.customerFollowList[0].nextFollowPlan:''}}
             </view> -->
           <view style="font-size: 14px;word-break: break-all; padding-left:20px;color:#1B365D;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;width: calc(100% - 40px); ">
-            下次跟进计划:{{form.nextFollowPlan?form.nextFollowPlan:''}}
+            下次跟进计划: 11111
           </view>
         </view>
         <!-- 步骤条 start -->
@@ -463,9 +464,9 @@
                         <view style="width: 70%;text-align: left;font-size: 3.5vw;color: #95A8CB;">
                           备注:<span style="line-height:56rpx;">{{item.remarks ? item.remarks : ''}}</span>
                         </view>
-                        <view style="width: 100%;text-align: right;font-size: 3.5vw;color: #95A8CB;">金额:<span style="line-height:56rpx;color:#CAA977;">
+                        <!-- <view style="width: 100%;text-align: right;font-size: 3.5vw;color: #95A8CB;">金额:<span style="line-height:56rpx;color:#CAA977;">
                             ¥{{ numberFormat.toThousandCents((item.priceSale ?
-                            item.priceSale : 0) * item.itemQuantity)}}</span></view>
+                            item.priceSale : 0) * item.itemQuantity)}}</span></view> -->
                       </view>
 
                     </view>

+ 882 - 44
package2/pages/customer-reception/add/add.js

@@ -1,66 +1,904 @@
-// package2/pages/customer-reception/add/add.js
+const app = getApp();
+const util = require('../../../../utils/util.js')
+const api = require('../../../../utils/api.js');
+const Constants = require('../../../../utils/Constants.js');
+const common = require('../../../../utils/common');
+const config = require('../../../../config/config.js') 
 Page({
 
-    /**
-     * 页面的初始数据
-     */
-    data: {
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    saveFlag: true,
+    checked_1: false,
+    checked_2: false,
+    checked_3: false,
+    checked_4: false,
+    checked_5: false,
+    checked_6: false,
+    checked_7: false,
+    checked_8: false,
+    //数量
+    quantity_1: '0',
+    quantity_2: '0',
+    quantity_3: '0',
+    quantity_4: '0',
+    quantity_5: '0',
+    quantity_6: '0',
+    quantity_7: '0',
+    quantity_8: '0',
+    show: false,
+    activeboxNames: ['1'],
+    form: {
+      customerName: '',
+      customerPhone: '',
+      AddressName: '',
+      addressNo: '',
+      FollowType: '',
+      NextFollowTime: '', //提醒时间
+      FollowUpContent: '', //跟进内容
+      NextFollowUpPlan: '', //下次跟进计划
+      CustomerIntentionsName: '', //客户意向
+      LeaveTime: '', //留店时长
+      CompetitionBrand: '', //竞品品牌
+      OtherName: '其他',
+      customerFrom: null,//客户来源
+      customerFromName: '',
+    },
+    minDate: new Date().getTime(),
+    radio_follow_up: '2',
+    selectflag: false,
+    followTypeFlag: false,
+    otherFlag: false,
+    customerIntentionsFlag: false,
+    competitionBrandFlag: false,
+    mustFillFlag: true, //必填项目
+    columns: [],
+    nextFollowTimeSearch: new Date().getTime() + 100,
 
+    formatter(type, value) {
+      if (type === 'year') {
+        return `${value}年`;
+      }
+      if (type === 'month') {
+        return `${value}月`;
+      }
+      if (type === 'day') {
+        return `${value}日`;
+      }
+      if (type === 'hour') {
+        return `${value}时`;
+      }
+      if (type === 'minute') {
+        return `${value}分`;
+      }
+      return value;
     },
+    fileList: [], //图片
+  },
+  /**
+   * 删除图片
+   */
+  deleteImg(e) {
+    let index = e.detail.index;
+    let arr = this.data.fileList;
+    arr.splice(index, 1);
+    this.setData({
+      fileList: arr
+    })
+  },
+  /**
+   * @desc : 上传方法
+   * @author : 于继渤
+   * @date : 2022/6/02 16:16
+   */
+  afterRead(event) {
+    const _this = this;
+    const {
+      file
+    } = event.detail;
+    file.forEach(res => {
+      // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
+      wx.uploadFile({
+        url: `${config.server_add}:${config.server_port}` + '/basic-server/file/upload',
+        filePath: res.path,
+        name: 'file',
+        formData: {
+          'folder': 't_csm_follow/follow'
+        },
+        header: {
+          'Authorization': 'Bearer ' + app.globalData.token
+        },
+        success(res) {
+          res.data = JSON.parse(res.data)
+          if (res.data.code === 200) {
+            let arr = _this.data.fileList;
+            arr.push({
+              url: res.data.data.absolutelyPath,
+              FilePath: res.data.data.relativePath,
+              deletable: true
+            })
+            _this.setData({
+              fileList: arr
+            })
+          }
+        },
+      })
+    })
+  },
 
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
 
-    },
+  /**
+   * 小程序地图调用
+   */
+  onClickWxchartAddress() {
+    // 跳转新建地图实例
+    common.onClickWxchartAddress();
+  },
 
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
+  /**
+   * 获取意向品类数据源
+   */
+  getGoodsSpecs() {
+    let param = {
+      dataSourceCode: "商品规格分类"
+    }
+    param.cpId = app.globalData.user.cpId
+    return new Promise((resolve, reject) => {
+      api.request(Constants.BASIC_COMMON_API + 'get_wx_init_data', 'POST', param).then(res => {
+        if (res.data.code === 200) {
+          let specsList = []
+          specsList = res.data.data
 
-    },
+          this.setData({
+            specsList
+          })
 
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
+          resolve(res)
+        } else {
+          reject(res)
+        }
+      })
+    })
 
-    },
+  },
 
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
+  /**
+   *手风琴 复选框 数据源监听事件
+   */
+  onDataChange(e) {
+    this.setData({
+      specsList: e.detail.dataList
+    })
+  },
 
-    },
+  /**
+   * 获取接待时常数据
+   */
+  followTime_init_base() {
+    let param = {
+      dataSourceCode: 'followTime'
+    }
+    api.request(Constants.BASIC_COMMON_API + 'get_wx_init_data', 'POST', param).then(res => {
 
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
+      if (res.data.code === 200) {
 
-    },
+        let followTime = []
+        let columns = []
+        followTime = res.data.data
+        followTime.forEach(element => {
+          columns.push(element.name)
+        });
+        this.setData({
+          columns
+        })
+      }
+    })
+  },
+  /**
+   * 新客接待单选
+   * @param {} event 
+   */
+  onRadio_Follow_Up(event) {
+    if (this.data.form.customerName == '无联系人' || this.data.type == 'add') {
+      this.setData({
+        radio_follow_up: event.detail,
+      });
+    }
 
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
+  
+  },
 
-    },
+  /**
+   * 提醒时间
+   */
+  onChangePickDate() {
+    this.setData({
+      show: true
+    })
+  },
+  /**
+   * @desc : 标识日期变化事件
+   * @author : 秦祺
+   * @date : 2022/5/26 17:16
+   */
+  changeDate(e) {
+    let key = e.currentTarget.dataset.key
+    //提醒时间
+    if (key === 'nextFollowTime') {
+      this.setData({
+        nextFollowTimeSearch: e.detail
+      })
+    }
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+  },
+  /**
+   * 关闭提醒时间
+   */
+  onCloseChooseDate() {
+    this.setData({
+      show: false
+    })
+  },
+  /**
+   * 确定提醒时间
+   * @param {*} e 
+   */
+  onConfirmChooseDate(e) {
+    let form = this.data.form
+    form.NextFollowTime = util.formatDataTime(new Date(this.data.nextFollowTimeSearch))
+    this.setData({
+      form: form,
+      show: false
+    })
+  },
+  /**
+   * 取消提醒时间
+   */
+  onCloseChooseDate() {
+    this.setData({
+      show: false
+    })
+  },
 
-    },
 
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
+  /**
+   * 客户查重
+   * @param {} event 
+   */
+
+  blurCustomerPhone(event) {
+    //根据联系电话判断客户是否存在 ,存在则跳转跟进
+    let customerPhone = this.data.form.customerPhone
+    if (customerPhone != '') {
+      let param = {
+        pageSize: '',
+        currentPage: '',
+        customerPhone: customerPhone,
+        saleStatus: '查重',
+      }
+      param.cpId = app.globalData.user.cpId
+      api.request(Constants.SALE_CUSTOMER_API + 'select_customer_list', 'POST', param).then(res => {
+        this.setData({
+          loading: false
+        })
+        if (res.data.code === 200) {
+
+          let list = res.data.data.list; //后台返回数据
+        
+
+          if (list.length > 0) { //有数据 就赋值
+            let form = this.data.form
+            form.customerName = list[0].customerName
+            form.customerId = list[0].customerId
+            form.addressNo = list[0].addressNo
+            form.addressArea = list[0].addressArea
+            form.saleStatus = list[0].saleStatus
+            form.addressName = list[0].addressName
+            this.setData({
+              form
+            })
+          } else {
+            // 如果根据联系电话没有查到数据,需要清空客户id,客户编码(企业微信没有联系电话的除外)
+            let form = this.data.form
+            if (!form.noTelephone) {
+              form.customerId = null;
+              form.customerCode = null;
+            }
+            this.setData({
+              form: form
+            })
+          }
+
+        }
+      })
+    }
+
+
+  },
+  /**
+   * 留店时长 
+   */
+  showPopup() {
+    this.setData({
+      selectflag: true
+    });
+  },
+  /**
+   * 跟进方式
+   */
+  showFollowTypePopup() {
+    this.setData({
+      followTypeFlag: true
+    });
+  },
+  /*
+   * 客户意向
+   */
+  showCustomerIntentionsPopup(e) {
+    let type = e.currentTarget.dataset.type
+    if (type === 'CustomerIntentions') {
+      this.setData({
+        customerIntentionsFlag: true
+      });
+    }
+    if (type === 'customerFrom') {
+      this.setData({
+        customerSourceFlag: true
+      })
+    }
+  },
+  //组件单选确定
+  mutiSearch(e) {
+    console.log(e)
+    console.log('选择啦')
+    let id = e.target.id
+    let form = this.data.form
+    if (id === 'customerFrom') {
+      form.customerFromName = e.detail.name
+      form.customerFrom = e.detail.id
+      console.log(form)
+    }
+    if (id === 'customerIntentions') {
+      form.CustomerIntentionsName = e.detail.name
+    }
+    if (id === 'other') {
+      form.OtherName = e.detail.name
+    }
+
+    this.setData({
+      form: form
+    })
+    if (form.CustomerIntentionsName == '已流失') {
+      this.setData({
+        competitionBrandFlag: true,
+      })
+    } else {
+      this.setData({
+        competitionBrandFlag: false,
+      })
+    }
+    if (form.CustomerIntentionsName == '放入公海') {
+      this.setData({
+        mustFillFlag: false
+      })
+    } else {
+      this.setData({
+        mustFillFlag: true
+      })
+    }
+  },
+  /**
+   * 留店时长
+   * @param {*} e 
+   */
+  onChange(e) {
+    let form = this.data.form
+    form.LeaveTime = e.detail.value
+    this.setData({
+      form: form,
+      selectflag: false
+    })
+  },
+  /**
+   * 取消留店时长
+   * @param {*} e 
+   */
+  onCancel() {
+    this.setData({
+      selectflag: false
+    })
+  },
+  /**
+   * 跟进内容
+   * @param {} event 
+   */
+  onFollowUpContentChange(event) {
+    let form = this.data.form
+    form.FollowUpContent = event.detail
+    this.setData({
+      form: form
+    })
+  },
+  /**
+   * 下次跟进计划
+   * @param {} event 
+   */
+  onNextFollowUpPlanChange(event) {
+    let form = this.data.form
+    form.NextFollowUpPlan = event.detail
+    this.setData({
+      form: form
+    })
+  },
+  /**
+   * 客户名称
+   * @param {*} event 
+   */
+  onCustomerNameChange(event) {
+    let form = this.data.form
+    form.customerName = event.detail
+    this.setData({
+      form: form
+    })
+  },
+  /**
+   * @desc : 联系电话输入事件
+   * @author : 于继渤
+   * @date : 2022/5/24 12:16
+   */
+  changeCustomerFormFieldPhone(e) {
+    let key = e.detail.currentTarget.dataset.key
+    let form = this.data.form
+    form.customerPhone = e.detail.detail
+    this.setData({
+      form: form
+    })
+  },
+  /**
+   * @desc : 修改联系电话
+   * @author : 周兴
+   * @date : 2022/10/27 18:16
+   */
+  editPhone(e) {
+    this.setData({
+      telephoneFlag: true,
+      telephone: this.data.form.customerPhone
+    })
+  },
+  /**
+   * @desc : 编辑联系电话事件
+   * @author : 周兴
+   * @date : 2022/10/27 12:16
+   */
+  closeCustomerPhonePop(e) {
+    this.setData({
+      telephoneFlag: false
+    })
+  },
+  /**
+  * @desc : 修改联系电话事件
+  * @author : 周兴
+  * @date : 2022/10/27 12:16
+  */
+  changeCustomerPhonePop(e) {
+    this.setData({
+      telephone: e.detail.detail
+    })
+  },
+  /**
+   * @desc : 更新联系电话
+   * @author : 周兴
+   * @date : 2022/10/27 12:16
+   */
+  updateCustomerPhone(e) {
+    let form = this.data.form
+    form.customerPhone = this.data.telephone
+    this.setData({
+      form: form,
+      telephoneFlag: false
+    })
+  },
+  /**
+   * 联系电话
+   * @param {*} event 
+   */
+  onCustomerPhoneChange(event) {
+    let form = this.data.form
+    form.customerPhone = event.detail
+
+    this.setData({
+      form: form
+    })
+  },
+  /**
+   * 客户地址
+   * @param {*} event 
+   */
+  onAddressNameChange(event) {
+    let form = this.data.form
+    form.AddressName = event.detail
+    this.setData({
+      form: form
+    })
+  },
+  /**
+   * 门牌号
+   * @param {*} event 
+   */
+  onAddressNoChange(event) {
+    let form = this.data.form
+    form.addressNo = event.detail
+    this.setData({
+      form: form
+    })
+  },
+  /**
+   * 选择跟进方式
+   * @param {*} e 
+   */
+  onFollowTypeChange(e) {
+    let form = this.data.form
+    form.FollowType = e.detail.value
+    this.setData({
+      form: form
+    })
+  },
+  /**
+   * 选择客户意向
+   * @param {*} e 
+   */
+  onCustomerIntentionsChange(e) {
+    let form = this.data.form
+    form.CustomerIntentions = e.detail.value
+
+    this.setData({
+      form: form
+    })
+  },
+
+  /**
+   * 关闭
+   * 
+   */
+  onClose() {
+    this.setData({
+      selectflag: false,
+      followTypeFlag: false,
+      customerIntentionsFlag: false,
+    })
+  },
+
+
+  /**
+   * @desc : 跳转选商品 orderType  1预算报价
+   * @author : 于继渤
+   * @date : 2022/6/14 12:16
+   */
+  toPay(e) {
+
+    this.setData({
+      toPayFlag: true
+    })
+    //this.submit();
+    let form = this.data.form
+    form.ascpId = app.globalData.user.ascpId
+    form.sale1Id = app.globalData.user.sale1Id
+    form.sale2Id = app.globalData.user.sale2Id
+    if (!form.noTelephone) {
+      if (!form.customerPhone) {
+        wx.showToast({
+          title: '请输入联系电话',
+          icon: 'none'
+        })
+        return false
+      }
 
+      if (!util.isPoneAvailable(form.customerPhone)) {
+        wx.showToast({
+          title: '联系电话格式不正确',
+          icon: 'none'
+        })
+        return false
+      }
     }
+    let that = this
+    setTimeout(function () {
+      wx.navigateTo({
+        url: '/package4/pages/order-billing/choose-goods/choose-goods?orderType=1&page=receiveCustomers&customerItem=' + JSON.stringify(that.data.form)
+      })
+    }, 200)
+
+  },
+  /**
+   * 提交保存
+   */
+  submit() {
+    if (!this.data.saveFlag) {
+      return
+    }
+    //业务员
+    let followUsers = app.globalData.user.userId
+    let result = this.checkForm();
+    if (result.flag) {
+      this.setData({
+        loading: true,
+        loadingButtonFlag: true
+      })
+      let specsList = this.data.specsList
+      let specsList_ = []
+      specsList.forEach(function (item) {
+        if (item.checked) {
+          specsList_.push({
+            "specsId": item.id,
+            "specsName": item.name,
+            "count": item.quantity,
+            "value": item.checked,
+            "other": item.other ? item.other : false
+          })
+        }
+      });
+      let param = {}
+      param.ascpId = app.globalData.user.ascpId
+      param.sale1Id = app.globalData.user.sale1Id
+      param.sale2Id = app.globalData.user.sale2Id
+      // 客户来源
+      param.customerFrom = this.data.form.customerFrom
+      //当前跟进人(业务员)
+      param.followUsers = [],
+      param.followUsers.push(followUsers) //业务员
+      param.customerName = this.data.radio_follow_up == 1 ? "无联系人" : this.data.form.customerName //客户名称 
+      param.customerId = this.data.form.customerId ? this.data.form.customerId : null //客户ID
+      param.salesChannel = app.globalData.user.channelId
+      if (this.data.form.customerId != null) {
+        if (this.data.form.saleStatus != '客成状态-成交') {
+          param.saleStatus = '客成状态-潜客'
+        } else {
+          param.saleStatus = this.data.form.saleStatus
+        }
+      }
+      param.customerPhone = this.data.form.customerPhone //联系电话
+      param.addressName = this.data.form.addressName //客户地址
+
+      if (this.data.form.addressArea) {
+        param.addressFull = (this.data.form.addressArea.province ? this.data.form.addressArea.province : '') + (this.data.form.addressArea.city ? this.data.form.addressArea.city : '') + (this.data.form.addressArea.district ? this.data.form.addressArea.district : '') + (this.data.form.addressName ? this.data.form.addressName : '') + (this.data.form.addressNo ? this.data.form.addressNo : '')
+      }
+
+      param.addressGcj02 = this.data.form.addressGcj02,
+        param.addressNo = this.data.form.addressNo //门牌号
+      param.addressArea = this.data.form.addressArea
+
+      //不同接待跟进状态不同
+      if (this.data.radio_follow_up == 1) {
+        param.followStatus = '跟进状态-接待' //跟进状态
+      } else if (this.data.radio_follow_up == 2) {
+        param.followStatus = '跟进状态-报备' //跟进状态
+      }
+
+      param.followType = '跟进方式-进店' //跟进方式
+      param.followData = this.data.form.FollowUpContent //跟进内容
+      param.nextFollowPlan = this.data.form.NextFollowUpPlan //下次跟进计划
+      param.nextFollowTime = this.data.form.NextFollowTime //下次跟进计划
+      param.stayTimeLen = '留店时长-' + this.data.form.LeaveTime //留店时长 
+      if (this.data.radio_follow_up == 2) {
+        param.intention = '客户意向-' + this.data.form.CustomerIntentionsName //客户意向
+      }
+      param.competitiveBrands = this.data.form.CompetitionBrand //竞品品牌
+      param.followOrg = app.globalData.user.orgId
+      param.intentionInfo = specsList_ //意向品类 
+
+      let fileList_ = this.data.fileList
+      let fileList = []
+      fileList_.forEach(item => {
+        fileList.push(item.FilePath)
+      })
+      // 跟进附件 20220613
+      param.annexPaths = {
+        annexPaths: fileList
+      }
+
+      if (this.data.radio_follow_up == '1') {
+        //陌生接待清空其他数据
+        param.customerPhone = ""
+        param.addressGcj02 = null
+        param.addressNo = ""
+        param.addressArea = null
+        param.addressName = null
+        param.nextFollowPlan = "" //下次跟进计划
+        param.nextFollowTime = "" //下次跟进计划
+      }
+      let API = ''
+      if(this.data.pageFlag  && this.data.pageFlag == 'edit'){
+        //编辑客户接待
+        API = 'update'
+        param.followId = this.data.form.followId ? this.data.form.followId  : null
+      }else{
+        API = 'insert'
+      }
+
+      api.request(Constants.SALE_CUSTOMERFOLLOW_API + API, 'POST', param).then(res => {
+        this.setData({
+          loading: false,
+        })
+        if (res.data.code === 200) {
+          wx.showToast({
+            title: '保存成功',
+            image: '/static/image/success.png',
+            duration: 1000
+          })
+          let deltaNum = 1
+          let pagesNum = 2
+          if(this.data.pageFlag  && this.data.pageFlag == 'edit'){
+            deltaNum = 2
+            pagesNum = 3
+          }
+          var pages = getCurrentPages();
+          var prevPage = pages[pages.length - pagesNum];
+          prevPage.setData({
+            selectflag: true
+          })
+          this.setData({
+            toPayFlag: false,
+            saveFlag: false
+          })
+          setTimeout(function () {
+            wx.navigateBack({
+              delta: deltaNum
+            })
+          }, 1000)
+        } else {
+          this.setData({
+            loadingButtonFlag: false
+          })
+        }
+
+
+      })
+    } else {
+      this.setData({
+        loading: false,
+        loadingButtonFlag: false
+      })
+      setTimeout(function () {
+        wx.showToast({
+          title: result.msg,
+          image: '/static/image/warning.png',
+          duration: 1000
+        })
+      }, 1000)
+
+
+    }
+
+  },
+  /* 表单校验 */
+  checkForm() {
+    //客户接待
+    if (this.data.radio_follow_up == 2) {
+      if (!this.data.form.customerName) {
+        return {
+          flag: false,
+          msg: '客户名称为空'
+        };
+      }
+      if (!this.data.form.customerPhone && !this.data.form.noTelephone) {
+        return {
+          flag: false,
+          msg: '客户电话为空'
+        };
+      }
+      if (!util.isPoneAvailable(this.data.form.customerPhone) && !this.data.form.noTelephone) {
+        return {
+          flag: false,
+          msg: '客户电话不正确'
+        };
+      }
+      if (!this.data.form.CustomerIntentionsName) {
+        return {
+          flag: false,
+          msg: '客户意向为空'
+        };
+      }
+      // if (!this.data.form.NextFollowTime && this.setData.mustFillFlag) {
+      //   return {
+      //     flag: false,
+      //     msg: '提醒时间为空'
+      //   };
+      // }
+    }
+
+    if (!this.data.form.FollowUpContent) {
+      return {
+        flag: false,
+        msg: '跟进内容为空'
+      };
+    }
+    if (!this.data.form.LeaveTime) {
+      return {
+        flag: false,
+        msg: '留店时长为空'
+      };
+    }
+
+    return {
+      flag: true,
+      msg: '表单校验通过'
+    }
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+ 
+
+  },
+
+  /**
+   * 页面取消
+   */
+  cancle() {
+    wx.navigateBack({
+      delta: -1
+    });
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+    // 页面卸载时设置插件选点数据为null,防止再次进入页面,geLocation返回的是上次选点结果
+    chooseLocation.setLocation(null);
+  },
+
+
+
+  /**
+    * @desc : 跳转选择客户
+    * @author : 于继渤
+    * @date : 2022/09/27 09:56
+    */
+  onChooseCustomer() {
+    wx.navigateTo({
+      url: '/package4/pages/order-billing/choose-customer/choose-customer?page=receiveAdd',
+    })
+  },
+ /**
+   * @desc : 加微信
+   * @date :
+   * @author : 
+   */
+  onnavigateToAddCustomer: function (e) {
+    if (!app.globalData.SystemInfo.environment) {
+      wx.showToast({
+        title: '请在企业微信模式下运行',
+        icon: 'none'
+      })
+      return
+    }
+    wx.qy.navigateToAddCustomer({
+      success: (res) => {
+      },
+      fail: (res) => {
+      },
+      complete: (res) => {
+      }
+    })
+
+  },
 })

+ 5 - 2
package2/pages/customer-reception/add/add.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
-}
+    "usingComponents": {},
+    "navigationBarTitleText": "新增接待"
+    
+  }
+  

+ 212 - 2
package2/pages/customer-reception/add/add.wxml

@@ -1,2 +1,212 @@
-<!--package2/pages/customer-reception/add/add.wxml-->
-<text>package2/pages/customer-reception/add/add.wxml</text>
+<!-- 前台导入wxmlUtil.wxs -->
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<!-- 单据信息 -->
+<loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
+
+<view style="margin: 10px 32rpx 10px 32rpx;margin-top: 10px;border-radius: 15rpx;box-shadow:2px 2px 5px #e5e5e6;">
+  <view style="background: #FFFFFF;box-shadow: 0rpx 10rpx 20rpx rgba(225, 229, 238, 0.6);border-radius: 15rpx;">
+
+    <van-radio-group value="{{ radio_follow_up }}" style="display:flex;background:white; padding-left: 7vw;" bind:change="onRadio_Follow_Up">
+      <view style="flex: 1;">
+        <van-radio name="2" style="margin: 2vw;font-size: 15px;" checked-color="#1B365D">客户接待 <text wx:if="{{pageFlag!='edit'}}" style='color:red;font-size:15px;'>*</text>
+          <view style="color: #95A8CB;font-size: 25rpx;">
+            留资客户
+          </view>
+        </van-radio>
+      </view>
+      <view style="flex: 1;">
+
+        <van-radio name="1" style="margin: 2vw;font-size: 15px;" checked-color="#1B365D">陌生接待
+          <view style="color: #95A8CB;font-size: 25rpx;">
+            无客户联系方式
+          </view>
+        </van-radio>
+      </view>
+    </van-radio-group>
+  </view>
+
+</view>
+
+<view>
+
+  <view class="table-show">
+    <view class="table-show-detail">
+
+      <view wx:if="{{radio_follow_up == 2}}">
+        <van-field label="客户名称" data-index="{{index}}" label-class="red-label" value="{{ form.customerName }}" data-key="customerName" input-align="left" maxlength="50" placeholder="请输入客户名称" border="{{ false }}" bind:change="onCustomerNameChange" use-button-slot>
+          <view slot="button" style="text-align: right; ">
+            <view catchtap="onChooseCustomerClear" style="justify-content: space-between;flex-flow: row nowrap;display: flex;">
+              <view Cell Slot="value" style="text-align: right;color: #95A8CB;">
+                <view catchtap="onChooseCustomer">
+                  <view>
+                    <van-icon name="user-o" color="#95A8CB" />选客户
+                  </view>
+                </view>
+
+
+              </view>
+              <view style="width: 10rpx;"></view>
+              <view catchtap="onnavigateToAddCustomer" slot="button" style="text-align: right; ">
+                <view style="justify-content: flex-end;flex-flow: row nowrap;display: flex;">
+                  <view>
+                    <image src="../../../../static/image/wx.png" style="width:38rpx;height:38rpx;" />
+                  </view>
+                </view>
+              </view>
+            </view>
+          </view>
+        </van-field>
+
+
+        <!-- 联系电话 -->
+        <dk-number-phone-input disabled="{{EditFlag||form.customerId}}" dataKey="phone" value="{{form.customerPhone}}" bind:changeField="changeCustomerFormFieldPhone" bind:changeFieldblur="blurCustomerPhone" errorMessage="联系电话格式错误" labelClass="{{form.noTelephone ? '' : 'red-label'}}" rightIcon="{{form.customerId?'edit':'phone'}}" label="客户电话" placeholder="请输入客户电话" bind:onEditphone="editPhone" bind:clickFieldInput="editPhone" disabledInput="{{EditFlag||form.customerId}}"></dk-number-phone-input>
+
+        <van-field catchtap="onClickWxchartAddress" readonly="{{true}}" value="{{ wxmlUtil.addressToIndexOf((form.addressArea.province?form.addressArea.province:'') +  (form.addressArea.city?form.addressArea.city:'') + (form.addressArea.district?form.addressArea.district:'') + (form.addressName?form.addressName:''))}}" input-align="left" label="客户地址" placeholder="请输入客户地址" autosize border="{{ false }}" bind:change="change" use-button-slot>
+          <view slot="button" style="text-align: right; ">
+            <view style="justify-content: space-between;flex-flow: row nowrap;display: flex;">
+              <view>
+                <van-icon name="location" color="#95A8CB" size="38rpx" />
+              </view>
+            </view>
+          </view>
+        </van-field>
+
+
+        <van-field value="{{ form.addressNo }}" input-align="left" label="门牌号" placeholder="请输入门牌号" autosize border="{{ false }}" bind:change="onAddressNoChange" use-button-slot>
+        </van-field>
+
+
+        <van-field readonly="{{ true }}" label-class="red-label" value="{{ form.CustomerIntentionsName }}" input-align="left" label-width="180rpx" label="客户意向" placeholder="请选择" border="{{ false }}" data-type='CustomerIntentions' catchtap="showCustomerIntentionsPopup" is-link />
+        <!--客户来源-->
+        <van-field focus="{{showMore}}" input-width="200rpx" input-class="dk-cell-value-class" label-class="red-label" input-align="left" data-key="customerFrom" maxlength="25" type="text" value="{{ form.customerFromName }}" label="客户来源" placeholder="请选择客户来源" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" data-type='customerFrom' catchtap="showCustomerIntentionsPopup" readonly="{{true}}">
+        </van-field>
+
+
+        <view wx:if="{{competitionBrandFlag}}">
+
+          <van-field value="{{ form.CompetitionBrand }}" input-align="left" label-class="red-label" label="竞品品牌" placeholder="请输入竞品品牌" autosize border="{{ false }}" bind:change="change">
+          </van-field>
+        </view>
+
+       
+        <dk-accordion-box titleName="意向品类" dataList="{{specsList}}" bind:onDataChange="onDataChange" showOtherFlag="{{true}}" showFieldFlag="{{true}}" disabledFlag="{{false}}" checkboxClinkFlag="{{true}}">
+        </dk-accordion-box>
+      </view>
+
+
+      <view style="height:1px;background: #f3f3f3;"></view>
+
+
+      <van-field rows="5" label-class="red-label" autosize label="跟进内容" value="{{ form.FollowUpContent }}" input-class="input-class" type="textarea" maxlength="1000" placeholder="请输入跟进内容" show-word-limit="{{true}}" bind:change="onFollowUpContentChange" border="{{false}}">
+      </van-field>
+
+      <!--分割线  -->
+      <view wx:if="{{radio_follow_up == 2}}">
+        <van-field rows="5" autosize label="下次跟进计划" value="{{ form.NextFollowUpPlan }}" type="textarea" maxlength="1000" placeholder="请输入下次跟进计划" show-word-limit input-class="input-class" bind:change="onNextFollowUpPlanChange" border="{{ false }}" />
+
+
+        <van-field readonly="{{ true }}" label-width="29%" value="{{ form.NextFollowTime }}" value-class="PickDate_Month" input-align="left" label="提醒时间" placeholder="请输入下次跟进计划" border="{{ false }}" catchtap="onChangePickDate" is-link />
+
+
+      </view>
+
+
+
+      <van-field readonly="{{ true }}" label-width="180rpx" label-class="red-label" value="{{ form.LeaveTime }}" input-align="left" label="留店时长" placeholder="请选择" border="{{ false }}" catchtap="showPopup" is-link />
+
+      <van-popup position="bottom" show="{{ selectflag }}" bind:close="onClose" class="popup" style="width:100%">
+        <van-picker show-toolbar="{{true}}" columns="{{ columns }}" bind:confirm="onChange" bind:cancel="onCancel" />
+      </van-popup>
+
+
+      <view style="background-color: white;  height: 180px;padding-left:32rpx;padding-top:11rpx; ">
+        <view style="margin-left: 15px;padding-top:10px; color:#95A8CB;">
+          图片
+        </view>
+
+        <van-uploader max-count="5" accept="image" style="margin-left: 4%;" preview-size="160rpx;" file-list="{{ fileList }}" bind:delete="deleteImg" bind:after-read="afterRead" multiple="true" imageFit="aspectFit" />
+        <view style="margin-left: 15px;color: #95A8CB">
+          图片最多上传5张
+        </view>
+      </view>
+    </view>
+  </view>
+  <view style="height:78px;">
+  </view>
+
+
+</view>
+
+
+<!--联系电话-->
+<van-popup show="{{ telephoneFlag }}" style="z-index: 999;" round="{{true}}" position="bottom" bind:close="closeCustomerPhonePop">
+  <van-cell-group>
+    <van-cell border="{{ false }}">
+      <view style="display: flex;">
+        <view style="width:80%;font-size:16px;color:#34495e;text-align:left;">
+          联系电话修改
+        </view>
+        <view style="text-align: right; width:20%; ">
+
+          <!-- <view style="width: 100%;text-align: right;">
+            <view style=" border-radius: 15rpx; background-color: #1B365D;text-align: center; height: 60rpx;" bindtap="updateCustomerPhone">
+              <view style="color: white;padding-top: 5rpx;">确定</view>
+            </view>
+
+          </view> -->
+
+
+        </view>
+      </view>
+
+
+
+    </van-cell>
+    <van-divider />
+    <dk-number-phone-input dataKey="customerPhone" value="{{form.customerPhone}}" bind:changeField="changeCustomerPhonePop"></dk-number-phone-input>
+    <view style="color:blue;font-size: 14px;padding-left: 30rpx;">注意:仅修改当前客户的联系电话</view>
+    <view style="height: 550rpx;"></view>
+    <view style="text-align: center;">
+      <van-button round size="large" color="#1B365D" custom-style="height:88rpx;width:640rpx;" type="info" size="small" bindtap="updateCustomerPhone">确定</van-button>
+    </view>
+     <view style="height: 40rpx;"></view>
+  </van-cell-group>
+</van-popup>
+
+
+
+<view class="botton-class">
+  <view style="padding:40rpx 34rpx 61rpx 43rpx; display: flex; ">
+    <view style="width:247rpx;height:88rpx;">
+      <van-button custom-style="height:80rpx;width:100%;border-radius: 15rpx;border:1px solid #1B365D;color:#1B365D;" plain disabled="{{loadingButtonFlag}}" loading="{{loadingButtonFlag}}"bind:click="cancle">取消
+      </van-button>
+    </view>
+    <view style="width:50%;height:80rpx; margin-left: 35px;">
+      <van-button color="#1B365D" custom-style="height:80rpx;width:100%;border-radius: 15rpx;" loading="{{loadingButtonFlag}}"disabled="{{loadingButtonFlag}}"bind:click="submit" type="info">保存
+      </van-button>
+    </view>
+  </view>
+
+</view>
+
+
+<!-- 购物车 -->
+<view catchtap="toPay" wx:if="{{pageFlag !='edit'}}" data-item="{{form}}" style="position:fixed;z-index: 10;bottom: 250rpx;right: 50rpx;">
+  <image style="height:51px;width: 51px;" src="/static/image/Group.png" />
+</view>
+
+<!-- 客户意向 -->
+<dk-single-dropdown-item show="{{customerIntentionsFlag}}" id='customerIntentions' choooseFlg="true" typeName='customerIntentions' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
+<!-- 客户来源 -->
+<dk-single-dropdown-item model:show="{{customerSourceFlag}}" id='customerFrom' typeName='customerFrom' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
+<!-- 意向品类- 其他 -->
+<dk-single-dropdown-item show="{{otherFlag}}" id='other' typeName='other' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
+
+<!-- 提醒时间 -->
+<van-popup position="bottom" show="{{ show }}" data-key="nextFollowTime" bind:close="onCloseChooseDate" class="popup" style="width:100%">
+  <view style="display:flex;justify-content: space-around;height:80rpx;">
+    <view style="width:45%;text-align: left;color:#b6b6b6;line-height:80rpx;" data-key="nextFollowTime" catchtap="onCloseChooseDate">取消</view>
+    <view style="width:45%;text-align: right;color:#1989fa;line-height:80rpx;" data-key="nextFollowTime" catchtap="onConfirmChooseDate">确定</view>
+  </view>
+  <van-datetime-picker min-date="{{ minDate }}" show-toolbar="{{false}}" bindonlyinput="changeDate" data-key="nextFollowTime" data-index="0" type="datetime" loading="{true}" value="{{ nextFollowTimeSearch }}" formatter="{{formatter}}" />
+</van-popup>

+ 53 - 1
package2/pages/customer-reception/add/add.wxss

@@ -1 +1,53 @@
-/* package2/pages/customer-reception/add/add.wxss */
+page {
+    background-color: white;
+}
+
+.input-class {
+    text-align: left !important;
+    height: 100px !important;
+}
+
+.van-field__label {
+    color: #1B365D !important;
+}
+
+.van-field__placeholder {
+    color: #95A8CB !important;
+}
+
+.van-cell__value {
+    color: #95A8CB !important;
+}
+
+.van-icon van-icon-arrow {
+    color: #95A8CB !important;
+}
+.van-field__input{
+   color: #1B365D !important;
+}
+/* 列表展示 */
+.table-show {
+    margin: 10px 32rpx 10px 32rpx;
+    margin-top: 10px;
+    border-radius: 15rpx;
+    box-shadow:2px 2px 5px #e5e5e6;
+}
+
+/* 列表展示 */
+.table-show-detail {
+    background: #FFFFFF;
+    box-shadow: 0rpx 10rpx 20rpx rgba(225, 229, 238, 0.6);
+    border-radius: 15rpx;
+}
+.botton-class{
+    background:#fff;
+    position:fixed;
+    bottom:0;
+    width:100%;
+    height: 182rpx; 
+    border-top:1px solid #efefef;
+    z-index: 7;
+    box-shadow: 0px -8rpx 24rpx rgba(0, 16, 39, 0.1);
+    border-radius: 30rpx 30rpx 0rpx 0rpx;
+}
+ 

+ 5 - 94
package2/pages/customer-reception/customer-reception.js

@@ -133,29 +133,9 @@ Page({
    */
   toDetail(e) {
     let item = e.currentTarget.dataset.item
-  
-    if (item.customerName == "无联系人") {
-
-      wx.navigateTo({
-        url: '/package3/pages/receive-customers/reception-details?item=' + encodeURIComponent(JSON.stringify(item)),
-      })
-    } else {
-      if (this.data.active == 1) { //跟进任务明细
-        wx.navigateTo({
-          url: '/package3/pages/follow-up-tasks/detail?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)),
-        })
-      } else if (item.followStatusName == "日常跟进"
-        || item.followStatusName == "邀约到店"
-        || item.followStatusName == "预约量尺") { //跟进明细
-        wx.navigateTo({
-          url: '/package3/pages/customer-follow-up/detail/detail?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)),
-        })
-      } else { // 接待明细
-        wx.navigateTo({
-          url: '/package3/pages/receive-customers/reception-details?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)),
-        })
-      }
-    }
+    wx.navigateTo({
+      url: './detail/detail?item=' + encodeURIComponent(JSON.stringify(item)),
+    })
 
 
 
@@ -653,78 +633,9 @@ Page({
       Receive_Customer_Measure: true,
     })
 
-    this.followTime_init_base()
-    this.getGoodsSpecs()
-    this.getReceptionStatus()
-
-    if (JSON.stringify(options) !== '{}') {
-      if (options.frommine) {
-        let frommine = JSON.parse(options.frommine)
-        var createtime = this.selectComponent('#createtime');
-        createtime.data.dataDefaultSearch = util.jumpPageDate(frommine.type === 2 ? -2 : frommine.date.value)
-
-
-        let followStatus = this.selectComponent('#followStatus')
-        let followStatusList = followStatus.data.moreList
-        followStatusList.forEach(fIt => {
-          if (frommine.followStatusList.some(it => fIt.id === it)) {
-            fIt.infotype = 'info'
-          }
-        })
-        followStatus.setData({
-          moreList: followStatusList
-        })
-
-        let searchForm = { ...this.data.searchForm }
-        searchForm.followStatusList = frommine.followStatusNameList
-
-        if (frommine.type === 2) {
-          this.setData({
-            active: frommine.active,
-            createTimeType: frommine.date,
-            searchForm: searchForm,
-            createTimeSearch: util.jumpPageDate(-2).map(it => new Date(it).getTime()),
-            staffIds: frommine.staffId ? [frommine.staffId] : [],
-            staffNames: frommine.staffNames,
-            searchFormNumber: frommine.followStatusNameList.length > 0 ? 1 : ''
-          })
-          createtime.data.dateSearch = util.jumpPageDate(-2).map(it => new Date(it).getTime())
-          
-        } else {
-          this.setData({
-            active: frommine.active,
-            createTimeType: frommine.date,
-            searchForm: searchForm,
-            createTimeSearch: util.jumpPageDate(frommine.date.value),
-            staffIds: frommine.staffId ? [frommine.staffId] : [],
-            staffNames: frommine.staffNames,
-            searchFormNumber: frommine.followStatusNameList.length > 0 ? 1 : ''
-          })
-        }
-        createtime.init()
-
-
-        if (frommine.active === 0) {
-          this.doSearch()
-        }
-        if (options.active) {
-          this.setData({
-            active: JSON.parse(options.active)
-          })
-        }
-      } else {
-        // 从主页跟进任务进入20220820
-        let active = JSON.parse(options.active)
-        if (active === 1 || active === 3) {
-          this.setData({
-            active: active
-          })
-          this.doSearch()
-        }
-      }
-    } else {
+ 
       this.doSearch()
-    }
+    
   },
 
   /**

+ 1 - 1
package2/pages/customer-reception/customer-reception.wxml

@@ -110,7 +110,7 @@
       <view class="table-content-row">
         <view class="customer-and-status">
           <view catchtap="toCustomer">
-            <van-icon wx:if="{{item.customerName!='无联系人'}}" name="/static/image/KHCFDC.png" size="38rpx" />
+            <van-icon wx:if="{{item.customerName!='无联系人'}}" name="/package2/static/image/KHCFDC.png" size="38rpx" />
 
             <van-icon wx:if="{{item.customerName =='无联系人'}}" name="https://b.yzcdn.cn/vant/icon-demo-1126.png" size="42rpx" />
 

+ 87 - 62
package2/pages/customer-reception/detail/detail.js

@@ -1,66 +1,91 @@
-// package2/pages/customer-reception/detail/detail.js
+// package3/pages/receive-customers/add/add.js 
+const app = getApp();
+const util = require('../../../../utils/util.js')
+const api = require('../../../../utils/api.js');
+const Constants = require('../../../../utils/Constants.js');
+const config = require('../../../../config/config.js')
 Page({
 
-    /**
-     * 页面的初始数据
-     */
-    data: {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
-
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+/**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+    let item = JSON.parse(decodeURIComponent(options.item))
+   
+    item.stayTimeLen = item.stayTimeLen?item.stayTimeLen.replace('留店时长-', ''):'';
+   // 图片显示
+   let fileArr =  []
+   fileArr =    item.annexPaths?(item.annexPaths.annexPaths? item.annexPaths.annexPaths:[]):[] 
+   let fileList = []
+   for(let i=0;i<fileArr.length;i++){
+     fileList.push({
+       url:config.server_img_http +  fileArr[i],
+       FilePath:  fileArr[i],
+       deletable: true
+     })
+   }  
+
+    this.setData({
+      item,
+      fileList
+    })
+    this.getGoodsSpecs()
+  },
+ /**
+   * 获取意向品类数据源
+   */
+  getGoodsSpecs() {
+    let param = {
+      dataSourceCode: "商品规格分类"
     }
+    param.cpId = app.globalData.user.cpId
+    api.request(Constants.BASIC_COMMON_API + 'get_wx_init_data', 'POST', param).then(res => {
+      if (res.data.code === 200) {
+        let specsList = []
+        specsList = res.data.data
+    
+          let itemList = this.data.item.intentionInfo?this.data.item.intentionInfo:[]
+        // 把数据库里的选择 赋值到控件上  编辑进
+        //todo 其他分类特殊 
+        specsList.forEach(function (item) {
+          item.quantity = 0
+          item.checked = false
+          item.other = false 
+          itemList.forEach(element => {
+             if(item.id === element.specsId){
+              item.quantity = element.count
+              item.checked = element.value
+             }          
+             if((item.name=="其他分类") &&element.other ){ //其他品类
+              item.other = element.other
+              item.quantity = element.count
+              item.checked = element.value
+              item.id = element.specsId
+              item.name = element.specsName
+            }
+         });   
+        });
+     
+        this.setData({
+          specsList
+        })
+      }
+    })
+  },
+
+
+  toEdit(){
+    wx.navigateTo({
+      url: '/package3/pages/receive-customers/add/add?item='+encodeURIComponent(JSON.stringify(this.data.item)) + '&pageFlag=edit',
+    })
+  },
+   
 })

+ 3 - 2
package2/pages/customer-reception/detail/detail.json

@@ -1,3 +1,4 @@
 {
-    "usingComponents": {}
-}
+    "usingComponents": {},
+    "navigationBarTitleText": "接待详情"
+  }

+ 101 - 2
package2/pages/customer-reception/detail/detail.wxml

@@ -1,2 +1,101 @@
-<!--package2/pages/customer-reception/detail/detail.wxml-->
-<text>package2/pages/customer-reception/detail/detail.wxml</text>
+<wxs src='../../../utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<!-- 单据信息 -->
+<view class="dk-card-outer-class">
+  <view class="dk-card-class">
+    <view>
+      <view>
+        <van-field readonly="{{true}}" label="客户名称" data-index="{{index}}" value="{{ item.customerName }}"
+          input-align="right" maxlength="50" border="{{ false }}" use-button-slot>
+
+        </van-field>
+
+        <view wx:if="{{item.customerName != '无联系人'}}"
+          style="display: flex; justify-content: space-between;width: 90%;height: 44px;background-color: white; padding-left: 16px;  align-items: center;">
+          <dk-text fontSize="14px" color="#2E3853" fontWeight="nomal" value="联系电话"
+            copyValue="{{item.customerPhone?item.customerPhone:''}}"></dk-text>
+          <view style="font-size: 13px; color: #95A8CB; ">{{item.customerPhone?item.customerPhone:''}}
+          </view>
+        </view>
+
+       
+      <!-- 客户地址 -->
+        <view wx:if="{{item.customerName != '无联系人'}}"
+          style="display: flex; justify-content: space-between;width: 90%;height: 44px;background-color: white; padding-left: 16px;  align-items: center;">
+          <view style="">
+            <dk-text fontSize="14px" color="#2E3853" fontWeight="nomal" value="客户地址" class="inputStyle"
+            copyValue="{{ wxmlUtil.addressFullIsUndefined(item.addressFull)}}"></dk-text>
+          </view>
+          
+            <view style="font-size: 13px; color: #95A8CB; text-align:right;">{{wxmlUtil.addressToIndexOf(item.addressFull?item.addressFull:'')}}</view>
+        </view>
+
+    
+
+
+        <!-- <van-field value="{{ item.addressNo }}" readonly="{{ true }}" input-align="right" label="门牌号" autosize
+          border="{{ false }}" use-button-slot>
+        </van-field> -->
+
+        <van-cell wx:if="{{item.customerName != '无联系人'}}" is-link border="{{ false }}" title-width="180rpx" title="客户意向" value="{{item.intentionName  }}" />
+
+        <view wx:if="{{item.CustomerIntentionsName == '已流失'}}">
+
+          <van-field value="{{ item.CustomerIntentionsName }}" input-align="left" label="竞品品牌" autosize
+            border="{{ false }}">
+          </van-field>
+        </view>
+
+
+        <!-- 手风琴,复选框输入 showOtherFlag :是否显示其他分类    showFieldFlag:是否显示输入框 
+        disabledFlag:输入框是否输入 checkboxClinkFlag:box能否点动-->
+        <dk-accordion-box wx:if="{{item.customerName != '无联系人'}}" titleName="意向品类" dataList="{{specsList}}" showOtherFlag="{{true}}" showFieldFlag="{{true}}"
+          disabledFlag="{{true}}" checkboxClinkFlag="{{false}}"> </dk-accordion-box>
+      </view>
+
+
+      <van-field rows="5" autosize label="跟进内容" value="{{ item.followData }}" input-class="input-class" type="textarea"
+        maxlength="1000" readonly="{{true}}"  border="{{false}}">
+      </van-field>
+
+      <van-field wx:if="{{item.customerName != '无联系人'}}" rows="5" autosize label="下次跟进计划" value="{{ item.nextFollowPlan?item.nextFollowPlan:'' }}"
+        type="textarea" maxlength="1000"  input-class="input-class" readonly="{{true}}"
+        border="{{false}}" />
+
+      <van-cell wx:if="{{item.customerName != '无联系人'}}" is-link value-class="PickDate_Month" title-width="29%" border="{{ false }}" title="提醒时间"
+        value="{{item.nextFollowTime?item.nextFollowTime:'' }}" />
+
+
+      <van-cell wx:if="{{item.stayTimeLen}}" is-link border="{{ false }}" title-width="180rpx" title="留店时长" value="{{ item.stayTimeLen }}" is-link />
+
+      <!-- 图片 -->
+      <view style="padding:19px;display:flex;background: white;">
+        <view>
+          <view style="font-size:14px;color: #95A8CB; margin-bottom: 10px;">
+            图片
+          </view>
+          <van-uploader file-list="{{ fileList }}" disabled="{{true}}" deletable="{{false}}" show-upload="{{false}}">
+          </van-uploader>
+        </view>
+      </view>
+
+      <view style="height: 7vw;"></view>
+    </view>
+  </view>
+</view>
+
+<view style="height: 249rpx;"></view>
+
+
+<view class="bottom-class-1" >
+  <view style="background:#fff;position:fixed;bottom:0;width:100%;z-index:2;margin-bottom: 45rpx;">
+    <view style="display:flex;justify-content: space-around;width:100%;">
+
+      <view style="width:100%;height:80rpx; text-align: center;">
+
+        <van-button color="#1B365D" custom-style="height:80rpx;width:90%;border-radius: 15rpx;" loading="{{loading}}" bind:click="toEdit"type="info">编辑
+        </van-button>
+      </view>
+    </view>
+
+  </view>
+</view>

+ 38 - 1
package2/pages/customer-reception/detail/detail.wxss

@@ -1 +1,38 @@
-/* package2/pages/customer-reception/detail/detail.wxss */
+page{
+    background-color: #F5F5F5;
+  }
+  .input-class{
+    text-align: left !important;
+    height: 100px !important;
+  }
+  .van-field__label{
+    color: #2E3853 !important;
+  }
+  .van-cell__title{
+    color: #2E3853 !important;
+  }
+  .inputStyle{
+    white-space:nowrap !important;
+  }
+  .van-cell__value{
+    color: #95A8CB !important;
+  }
+  .van-field__input{
+    color: #95A8CB !important;
+  }
+  .van-field__word-limit{
+    color: #95A8CB !important;
+  } 
+  
+  
+  .bottom-class-1{
+    background:#fff;
+    position:fixed;
+    bottom:0;
+    width:100%;
+    height: 182rpx; 
+    border-top:1px solid #efefef;
+    z-index: 7;
+    box-shadow: 0px -8rpx 24rpx rgba(0, 16, 39, 0.1);
+    border-radius: 30rpx 30rpx 0rpx 0rpx;
+  }

+ 376 - 170
utils/common.js

@@ -20,145 +20,229 @@ var qqmapsdk;
   * 小程序地图调用
   */
 function onClickWxchartAddress() {
-  const key = config.key; //使用在腾讯位置服务申请的key
-  const referer = 'wx76a9a06e5b4e693e'; //调用插件的app的名称
-  const category = '小区';
-  wx.navigateTo({
-    url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer + '&category=' + category
-  });
+    const key = config.key; //使用在腾讯位置服务申请的key
+    const referer = 'wx76a9a06e5b4e693e'; //调用插件的app的名称
+    const category = '小区';
+    wx.navigateTo({
+        url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer + '&category=' + category
+    });
 }
 /**
  * 判断是否有按钮权限
  * @param {*} functionCode 
  */
 function hasRight(functionCode) {
-  let rights = app.globalData.user.rights
-  let value = false
-  if (rights != null && rights.length > 0) {
-    rights.forEach(item => {
-      if (item.FunctionCode == functionCode) {
-        value = true
-        return
-      }
-    })
-  }
-  return value
-}
-/**
- * @desc : 前台实现千分位
- * @date : 2022/6/30 16:49
- * @author : 周兴
- */
-function toThousandCents(num) {
-  if (num == undefined) {
-      return 0;
-  }
-  var num = num + '';
-  var d = '';
-  if (num.slice(0, 1) == '-') {
-      d = num.slice(0, 1);
-      num = num.slice(1);
-  }
-  var len = num.length;
-  var index = num.indexOf('.');
-  if (index == -1) {
-      num = num + '.00';
-  } else if ((index + 2) == len) {
-      num = num + '0';
-  }
-  var index = num.indexOf('.'); // 字符出现的位置
-  var num2 = num.slice(-3);
-  num = num.slice(0, index)
-  var result = '';
-  while (num.length > 3) {
-      result = ',' + num.slice(-3) + result;
-      num = num.slice(0, num.length - 3);
-  }
-  if (num) {
-      result = num + result;
-  }
-  return d + (result + num2)
+    let rights = app.globalData.user.rights
+    let value = false
+    if (rights != null && rights.length > 0) {
+        rights.forEach(item => {
+            if (item.FunctionCode == functionCode) {
+                value = true
+                return
+            }
+        })
+    }
+    return value
 }
+
 /**
  * 跳转到固定节点的位置
  * @param {*} selectid 
  * @param {*} minus 
  */
 function navigatePosition(selectid, minus) {
-  //1、返回一个查询实例
-  const query = wx.createSelectorQuery();
-  //2、选择要跳转的节点id
-  query.select('#' + selectid).boundingClientRect();
-  //3、获取显示区域的尺寸、滚动等位置等信息,然后添加节点的滚动位置查询
-  query.selectViewport().scrollOffset();
-  //4、执行跳转
-  query.exec((res) => {
-    //5、res[0]是步骤2中的数据,res[1]是步骤3中的数据
-    if (res[0] && res[1]) {
-      //6、将页面滚动到目标位置  减300不是固定的 根据自己的要求调
-      wx.pageScrollTo({
-        //7、计算滚动到目标的位置  
-        scrollTop: res[0].top + res[1].scrollTop - minus,
-        duration: 300
-      })
+    //1、返回一个查询实例
+    const query = wx.createSelectorQuery();
+    //2、选择要跳转的节点id
+    query.select('#' + selectid).boundingClientRect();
+    //3、获取显示区域的尺寸、滚动等位置等信息,然后添加节点的滚动位置查询
+    query.selectViewport().scrollOffset();
+    //4、执行跳转
+    query.exec((res) => {
+        //5、res[0]是步骤2中的数据,res[1]是步骤3中的数据
+        if (res[0] && res[1]) {
+            //6、将页面滚动到目标位置  减300不是固定的 根据自己的要求调
+            wx.pageScrollTo({
+                //7、计算滚动到目标的位置  
+                scrollTop: res[0].top + res[1].scrollTop - minus,
+                duration: 300
+            })
+        }
+    });
+}
+
+/**
+ * @desc : 前台实现千分位
+ * @date : 2022/6/30 16:49
+ * @author : 周兴
+ */
+function toThousandCents(num) {
+    if (num == undefined) {
+        return 0;
+    }
+    var num = num + '';
+    var d = '';
+    if (num.slice(0, 1) == '-') {
+        d = num.slice(0, 1);
+        num = num.slice(1);
+    }
+    var len = num.length;
+    var index = num.indexOf('.');
+    if (index == -1) {
+        num = num + '.00';
+    } else if ((index + 2) == len) {
+        num = num + '0';
+    }
+    var index = num.indexOf('.'); // 字符出现的位置
+    var num2 = num.slice(-3);
+    num = num.slice(0, index)
+    var result = '';
+    while (num.length > 3) {
+        result = ',' + num.slice(-3) + result;
+        num = num.slice(0, num.length - 3);
+    }
+    if (num) {
+        result = num + result;
     }
-  });
+    return d + (result + num2)
 }
- 
 
 /**
  * 导航
  */
 function navigate(address) {
-  qqmapsdk.geocoder({
-    //获取表单传入地址
-    address: address,
-    //地址参数,例:固定地址,address: '北京市海淀区彩和坊路海淀西大街74号'
-    success: function (res) {//成功后的回调 
-      var res = res.result;
-      var latitude = res.location.lat;
-      var longitude = res.location.lng;
-
-      wx.openLocation({
-        latitude,
-        longitude,
-        scale: 18
-      })
-    },
-    fail: function (error) {
-      wx.showToast({
-        title: '地址无法导航',
-        image: '/static/image/warning.png',
-        duration: 1000
-      })
-    },
-    complete: function (res) {
+
+    qqmapsdk.geocoder({
+        //获取表单传入地址
+        address: address,
+        //地址参数,例:固定地址,address: '北京市海淀区彩和坊路海淀西大街74号'
+        success: function (res) {//成功后的回调 
+            var res = res.result;
+            var latitude = res.location.lat;
+            var longitude = res.location.lng;
+
+            wx.openLocation({
+                latitude,
+                longitude,
+                scale: 18
+            })
+        },
+        fail: function (error) {
+            wx.showToast({
+                title: '地址无法导航',
+                image: '/static/image/warning.png',
+                duration: 1000
+            })
+        },
+        complete: function (res) {
+        }
+    })
+}
+
+/**
+* @desc : 设置图片路径
+* @date : 2022/7/5 16:49
+* @author : 周兴
+*/
+function setSkuIcon(skuData) {
+    if (skuData && skuData.length > 0) {
+        let imagePath = config.server_img_http;
+        let imageHgPath = config.server_hg_img_http;
+        if (skuData != null && skuData.length > 0) {
+            skuData.forEach(it => {
+                if (it.pathType === 1) { //业务中台 2   本系统 1     2 需要加密
+                    // 对行数据进行图标路径的处理
+                    setImagePath(it, imagePath, imageHgPath);
+                    // 如果有子级,需要对子级进行处理
+                    if (it.goodsSkuList != null && it.goodsSkuList.length > 0) {
+                        it.goodsSkuList.forEach(row => {
+                            // 对子数据行数据进行图标路径的处理
+                            setImagePath(row, imagePath, imageHgPath);
+                        })
+                    }
+                }
+
+            })
+        }
+    }
+}
+/**
+* @desc : 设置行的图标路径
+* @date : 2022/7/5 16:49
+* @author : 周兴
+*/
+function setImagePath(it, imagePath, imageHgPath) {
+    // 根据图标来源设置绝对路径
+    if (it.pathType == Constants.PATH_TYPE.HG) {
+        if (it.iconPath && it.iconPath.indexOf(imageHgPath) < 0) {
+            it.iconPath = imageHgPath + it.iconPath
+        }
+        if (it.iconThumPath && it.iconThumPath.indexOf(imageHgPath) < 0) {
+            it.iconThumPath = imageHgPath + it.iconThumPath
+        }
+    } else {
+        if (it.iconPath && it.iconPath.indexOf(imagePath) < 0) {
+            it.iconPath = imagePath + it.iconPath
+        }
+        if (it.iconThumPath && it.iconThumPath.indexOf(imagePath) < 0) {
+            it.iconThumPath = imagePath + it.iconThumPath
+        }
+    }
+}
+
+
+function setImagePathForm(it, imagePath, imageHgPath) {
+    // 根据图标来源设置绝对路径
+    if (it.path_type == Constants.PATH_TYPE.HG) {
+        if (it.icon_path && it.icon_path.indexOf(imageHgPath) < 0) {
+            it.icon_path = imageHgPath + it.icon_path
+        }
+        if (it.icon_thum_path && it.icon_thum_path.indexOf(imageHgPath) < 0) {
+            it.icon_thum_path = imageHgPath + it.icon_thum_path
+        }
+    } else {
+        if (it.icon_path && it.icon_path.indexOf(imagePath) < 0) {
+            it.icon_path = imagePath + it.icon_path
+        }
+        if (it.icon_thum_path && it.icon_thum_path.indexOf(imagePath) < 0) {
+            it.icon_thum_path = imagePath + it.icon_thum_path
+        }
     }
-  })
-}  
+}
+/**
+* @desc : 设置行的图标路径
+* @date : 2022/7/5 16:49
+* @author : 周兴
+*/
+function setRowImagePath(it) {
+    let imagePath = config.server_img_http;
+    let imageHgPath = config.server_hg_img_http;
+    // 根据图标来源设置绝对路径
+    setImagePath(it, imagePath, imageHgPath);
+}
 
 /**
  *  本接口提供由坐标到坐标所在位置的文字描述的转换,输入坐标返回地理位置信息和附近poi列表。
  * @param {*} loc 
  */
 function reverseGeocoder(loc) {
-  return new Promise(resolve => {
-    qqmapsdk.reverseGeocoder({
-      location: {
-        latitude: loc.latitude,
-        longitude: loc.longitude
-      } || '',
-      //get_poi: 1, //是否返回周边POI列表:1.返回;0不返回(默认),非必须参数
-      success: function (res) {//成功后的回调
-        resolve(res)
-      },
-      fail: function (error) {
-        resolve('')
-      },
-      complete: function (res) {
-      }
-    })
-  });
+    return new Promise(resolve => {
+        qqmapsdk.reverseGeocoder({
+            location: {
+                latitude: loc.latitude,
+                longitude: loc.longitude
+            } || '',
+            //get_poi: 1, //是否返回周边POI列表:1.返回;0不返回(默认),非必须参数
+            success: function (res) {//成功后的回调
+                resolve(res)
+            },
+            fail: function (error) {
+                resolve('')
+            },
+            complete: function (res) {
+            }
+        })
+    });
 }
 
 /**
@@ -167,27 +251,27 @@ function reverseGeocoder(loc) {
    * @param {*} toloc 
    */
 function calculateDistance(fromloc, toloc) {
-  return new Promise(resolve => {
-    //调用距离计算接口
-    qqmapsdk.calculateDistance({
-      //mode: 'straight',//可选值:'driving'(驾车)、'walking'(步行),不填默认:'walking',可不填 新增直线距离计算,‘straight’(直线)
-      //from参数不填默认当前地址
-      //获取表单提交的经纬度并设置from和to参数(示例为string格式)
-      from: fromloc, //若起点有数据则采用起点坐标,若为空默认当前地址
-      to: toloc, //终点坐标
-      success: function (res) {//成功后的回调  
-        var destinationDistance = res.result.elements[0].distance;
-        console.log("calculateDistance-ok", res);
-        resolve(destinationDistance)
-      },
-      fail: function (error) {
-        console.log("calculateDistance-error", error);
-        resolve(0)
-      },
-      complete: function (res) {
-      }
+    return new Promise(resolve => {
+        //调用距离计算接口
+        qqmapsdk.calculateDistance({
+            //mode: 'straight',//可选值:'driving'(驾车)、'walking'(步行),不填默认:'walking',可不填 新增直线距离计算,‘straight’(直线)
+            //from参数不填默认当前地址
+            //获取表单提交的经纬度并设置from和to参数(示例为string格式)
+            from: fromloc, //若起点有数据则采用起点坐标,若为空默认当前地址
+            to: toloc, //终点坐标
+            success: function (res) {//成功后的回调  
+                var destinationDistance = res.result.elements[0].distance;
+
+                resolve(destinationDistance)
+            },
+            fail: function (error) {
+
+                resolve(0)
+            },
+            complete: function (res) {
+            }
+        });
     });
-  });
 
 }
 
@@ -197,14 +281,14 @@ function calculateDistance(fromloc, toloc) {
  * @param {*} lng 
  */
 function bdMap_to_wxMap(lat, lng) {
-  let pi = 3.14159265358979324 * 3000.0 / 180.0;
-  let x = lng - 0.0065;
-  let y = lat - 0.006;
-  var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * pi);
-  var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * pi);
-  let lngv = z * Math.cos(theta);
-  let latv = z * Math.sin(theta);
-  return { 'longitude': lngv, 'latitude': latv };
+    let pi = 3.14159265358979324 * 3000.0 / 180.0;
+    let x = lng - 0.0065;
+    let y = lat - 0.006;
+    var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * pi);
+    var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * pi);
+    let lngv = z * Math.cos(theta);
+    let latv = z * Math.sin(theta);
+    return { 'longitude': lngv, 'latitude': latv };
 }
 
 /**
@@ -213,33 +297,122 @@ function bdMap_to_wxMap(lat, lng) {
  * @param {*} lng 
  */
 function wxMap_to_bdMap(lat, lng) {
-  let pi = 3.14159265358979324 * 3000.0 / 180.0;
-  let x = lng;
-  let y = lat;
-  var z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * pi);
-  var theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * pi);
-  let lngv = z * Math.cos(theta) + 0.0065;
-  let latv = z * Math.sin(theta) + 0.006;
-  return { 'longitude': lngv, 'latitude': latv };
+    let pi = 3.14159265358979324 * 3000.0 / 180.0;
+    let x = lng;
+    let y = lat;
+    var z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * pi);
+    var theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * pi);
+    let lngv = z * Math.cos(theta) + 0.0065;
+    let latv = z * Math.sin(theta) + 0.006;
+    return { 'longitude': lngv, 'latitude': latv };
 }
 /**
  * 在onload时间中新建qq地址对象
  */
 function openQQMap() {
-  if (qqmapsdk === undefined || qqmapsdk === null) {
-    qqmapsdk = new QQMapWX({
-      key: '7I3BZ-VADCX-TJQ4C-TN5O4-F4BZE-RDFCK'
-    });
-  }
+    if (qqmapsdk === undefined || qqmapsdk === null) {
+        qqmapsdk = new QQMapWX({
+            key: '7I3BZ-VADCX-TJQ4C-TN5O4-F4BZE-RDFCK'
+        });
+    }
+}
+
+/**
+  * @desc : 计算品类数
+  * @date : 2022/7/11 16:49
+  * @author : 周兴
+  */
+function getCategoryQuantity(goodsList) {
+    let categoryQuantityList = []      // 品类数
+    goodsList.forEach(res => {
+        // 如果有子级,计算子级的数量
+        if (res.goodsSkuList && res.goodsSkuList.length > 0) {
+            res.goodsSkuList.forEach(it => {
+                if (it.skuSpecs == null) {
+                    it.skuSpecs = " "
+                }
+                if (it.skuSpecs && !categoryQuantityList.includes(it.skuSpecs) && !it.flgBomCombined) {
+                    categoryQuantityList.push(it.skuSpecs)
+                }
+            })
+        } else {
+            if (res.skuSpecs == null) {
+                res.skuSpecs = " "
+            }
+            // 如果没有子级,就加上即可
+            if (res.skuSpecs && !categoryQuantityList.includes(res.skuSpecs) && !res.flgBomCombined) {
+                categoryQuantityList.push(res.skuSpecs)
+            }
+        }
+    })
+    return categoryQuantityList.length;
 }
 /**
+  * @desc : 重新计算最后一条金额(用父级去减去其他的金额,计算最后一条)
+  * @date : 2022/7/7 16:49
+  * @author : 周兴
+  */
+function countLastAmount(choosedGoodsList, followFlag) {
+    if (choosedGoodsList && choosedGoodsList.length > 0) {
+        let pRows = choosedGoodsList.filter(it => !it.parentId || it.parentId == null);
+        if (pRows && pRows.length > 0) {
+            pRows.forEach(it => {
+                if (it.goodsSkuList != null && it.goodsSkuList.length > 0) {
+                    // 获取子级
+                    let childRows = it.goodsSkuList.filter(row => row.parentId == it.id && row.hasChild == 0);
+
+
+                    let amount = Number(it.itemAmount); // 父级的金额
+
+                    if (childRows && childRows.length > 0) {
+                        // 只到倒数第二条
+                        for (let i = 0; i < childRows.length - 1; i++) {
+
+                            amount = util.SubNumber(amount, Number(childRows[i].itemAmount))
+                        }
+
+                        // 如果是退换补,还需要给实际赋值  //于继渤  添加else分支  不然 退还补 选完bom 价格出现NAN 报错   2022/07/21
+                        childRows[childRows.length - 1].itemAmount = amount;
+                        childRows[childRows.length - 1].priceSale = Number(childRows[childRows.length - 1].itemAmount / childRows[childRows.length - 1].itemQuantity).toFixed(2)
+                        if (followFlag) {
+                            childRows[childRows.length - 1].tItemAmount = amount;
+                            childRows[childRows.length - 1].priceSale = Number(childRows[childRows.length - 1].tItemAmount / childRows[childRows.length - 1].tItemQuantity).toFixed(2)
+                        }
+                    }
+                }
+            })
+        }
+    }
+}
+
+
+
+
+/**
  * 判断是否有按钮权限
  * @param {*} functionCode 
  */
 function hasButtonRight(functionCode) {
-  let buttonRights = app.globalData.buttonRights
-  let orderAuditVisible = buttonRights.indexOf(functionCode)
-  return orderAuditVisible == -1 ? false : true
+    let buttonRights = app.globalData.buttonRights
+    let orderAuditVisible = buttonRights.indexOf(functionCode)
+    return orderAuditVisible == -1 ? false : true
+}
+
+/**
+ * 判断必填项
+ * @param {*} functionCode 
+ */
+function hasInputPageItemMust(functionCode) {
+    let pageItemMusts = app.globalData.pageItemMusts
+    console.log('pageItemMusts', pageItemMusts)
+    let orderAuditVisible = false
+    pageItemMusts.forEach(res => {
+        if (res.itemCodeTag['WX-CODE'] && res.itemCodeTag['WX-CODE'].indexOf(functionCode) != -1 && res.flgMustItem) {
+            orderAuditVisible = true
+        }
+    })
+
+    return orderAuditVisible
 }
 
 /**
@@ -247,26 +420,59 @@ function hasButtonRight(functionCode) {
  * @param {*} functionCode 
  */
 function hasPageUUidRight(uuid) {
-  let pageRights = app.globalData.pageRights
-  let pageVisible = pageRights.indexOf(uuid)
-  return pageVisible == -1 ? false : true
+    if (uuid) {
+        let pageRights = app.globalData.pageRights
+        let pageVisible = pageRights.indexOf(uuid)
+        return pageVisible == -1 ? false : true
+    } else {
+        return
+    }
+
 }
+function isUserSensitive() {
+    //敏感信息控制
+    if (app.globalData.user.userSensitive && app.globalData.user.userSensitive.length > 0) {
+        let userSensitive = app.globalData.user.userSensitive
+        let purchasePriceFlag = true
+        userSensitive.forEach(res => {
+            if (res.isCheck) {
+                if (res.docCode == '分销采购订单' && res.itemName == '采购价格' && res.isCheck) {
+                    //   purchasePriceFlag = false
+                    purchasePriceFlag = true
+                }
+            } else {
+                purchasePriceFlag = false
+            }
 
+        })
+        return purchasePriceFlag
+    } else {
+        return false
+    }
+}
 /**
  * 导出函数
  */
 module.exports = {
-  openQQMap,
-  navigate, 
-  reverseGeocoder,
-  calculateDistance,
-  hasButtonRight,
-  hasRight,
-  wxMap_to_bdMap,
-  bdMap_to_wxMap,  
-  onClickWxchartAddress,  
-  hasPageUUidRight ,
-  toThousandCents
+    openQQMap,
+    navigate,
+    toThousandCents,
+    reverseGeocoder,
+    calculateDistance,
+    hasButtonRight,
+    hasRight,
+    wxMap_to_bdMap,
+    bdMap_to_wxMap,
+    setSkuIcon,
+    setRowImagePath,
+    onClickWxchartAddress,
+    countLastAmount,
+    getCategoryQuantity,
+    setImagePath,
+    hasPageUUidRight,
+    setImagePathForm,
+    hasInputPageItemMust,
+    isUserSensitive
 }