Ver Fonte

销售线索跟进正常语音识别录入

xiaohaizhao há 3 anos atrás
pai
commit
317aabe725

+ 10 - 1
packageA/saleClue/addFollow.js

@@ -30,7 +30,7 @@ Page({
     },
     bindTimeChange(e) {
         this.setData({
-            time: e.detail.value+":00"
+            time: e.detail.value + ":00"
         })
     },
     /* 跟进初始化 */
@@ -200,6 +200,15 @@ Page({
         })
         this.isDisabled();
     },
+    /* 语音录入 */
+    onVoiceInput({
+        detail
+    }) {
+        this.setData({
+            "content.content": detail
+        })
+        this.isDisabled();
+    },
     isDisabled() {
         let data = this.data.content;
         this.setData({

+ 2 - 1
packageA/saleClue/addFollow.json

@@ -1,7 +1,8 @@
 {
     "usingComponents": {
         "My_upload": "/components/My_upload/index",
-        "van-datetime-picker": "@vant/weapp/datetime-picker/index"
+        "van-datetime-picker": "@vant/weapp/datetime-picker/index",
+        "Yl_VoiceInput": "/components/Yl_VoiceInput/index"
     },
     "navigationBarTitleText": "线索跟进"
 }

+ 7 - 1
packageA/saleClue/addFollow.scss

@@ -3,6 +3,7 @@
     box-sizing: border-box;
 
     .label {
+        position: relative;
         height: 40rpx;
         font-size: 28rpx;
         font-family: PingFang SC-Regular, PingFang SC;
@@ -15,6 +16,12 @@
             color: #FF3B30;
             margin-right: 8rpx;
         }
+
+        .Yl_VoiceInput{
+            position: absolute;
+            margin-left: 20rpx;
+            top: -2rpx;
+        }
     }
 
     .input-class {
@@ -115,7 +122,6 @@
     bottom: 0 !important;
     text-align: center;
     background-color: #FFFFFF;
-    z-index: 99;
 
     .button {
         width: 500rpx !important;

+ 5 - 3
packageA/saleClue/addFollow.wxml

@@ -1,6 +1,6 @@
 <view class="box">
     <view class="label"><text>*</text>选择日期</view>
-    
+
     <picker mode="date" value="{{date1}}" bindchange="bindDateChange">
         <view class="picker">
             <view class="selector">
@@ -31,9 +31,11 @@
         <view class="{{content.logtype=='预约到店'?'op':''}}" data-name="预约到店">预约到店</view>
         <view class="{{content.logtype=='互加微信'?'op':''}}" data-name="互加微信">互加微信</view>
     </view> -->
-    <view class="label"><text>*</text>本次跟进内容</view>
-    <textarea value='{{content.content}}' class="textarea selector" bind:input="inputChange" placeholder="请描述跟进情况及内容" />
 
+    <view class="label"><text>*</text>本次跟进内容
+        <Yl_VoiceInput class="Yl_VoiceInput" bindcallback="onVoiceInput" />
+    </view>
+    <textarea value='{{content.content}}' class="textarea selector" bind:input="inputChange" placeholder="请描述跟进情况及内容" />
     <view style="display: flex;justify-content: space-between;align-items: center;width: 690rpx; margin: 20rpx auto 0;">
         <view class="label" style="margin: 0;">附件:</view>
         <view>