Commit 7a574c5d by 张立顺

Merge branch 'dev_V4.20.0' of http://192.168.3.233:8090/saas_plus/dj-car-boutiqu…

…e-work-wechat into dev_V4.20.0
2 parents 38df4a1b 2ab5bde1
......@@ -255,7 +255,7 @@ Component({
value: [2]
},
{
name: '过期到店',
name: '超时未到店',
value: [5]
},
{
......
......@@ -39,7 +39,7 @@ Page({
item.isInvite = new Date() < new Date(item.inviteDate + ' ' + item.endTime)
console.log(item, '???')
})
// toShopStatus - 到店状态(1:未到店,2:已到店,3:过期到店)
// toShopStatus - 到店状态(1:未到店,2:已到店,3:超时未到店)
this.setData({
list: data,
triggered: false
......
......@@ -8,7 +8,7 @@
<view class="bar-point"></view>
<view>客户已预约</view>
<view class="bar-point orange"></view>
<view>客户超时未到店</view>
<view>客户超时未到店</view>
<view class="bar-point grey"></view>
<view>客户订单已施工</view>
</view>
......@@ -23,14 +23,16 @@
<view wx:else class="tip-txt">本轮时段已约满</view>
<view wx:if="{{item.maxNum < 0 && item.isInvite}}">本轮时段不可预约</view>
</view>
<view class="content" wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view>
<view class="flex card-name">
<!-- toShopStatus - 到店状态(1:未到店,2:已到店,3:过期到店) -->
<view class="bar-point card-point {{subItem.toShopStatus == 2 ? 'grey' : ''}} {{subItem.toShopStatus == 3 ? 'orange' : ''}}"></view>
<view>{{subItem.customerName}}</view>
<view class="content-box">
<view class="content" wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view>
<view class="flex card-name">
<!-- toShopStatus - 到店状态(1:未到店,2:已到店,3:超时未到店) -->
<view class="bar-point card-point {{subItem.toShopStatus == 2 ? 'grey' : ''}} {{subItem.toShopStatus == 3 ? 'orange' : ''}}"></view>
<view>{{subItem.customerName}}</view>
</view>
<view wx:if="{{subItem.carSeriesName}}" class="text-hide card-car">{{subItem.carSeriesName}}</view>
</view>
<view wx:if="{{subItem.carSeriesName}}" class="text-hide card-car">{subItem.carSeriesName}}</view>
</view>
</view>
<view wx:if="{{item.remainNum > 0 && item.isInvite}}" class="content appr-btn" bindtap="handleInvite" data-item="{{item}}">+预约</view>
......
......@@ -71,8 +71,14 @@
color: #C3C3C3;
}
.card-box .content-box {
display: flex;
flex-wrap: wrap;
}
.card-box .content {
width: 208rpx;
/* width: 208rpx; */
width: calc((100% - 20rpx) / 3);
height: 112rpx;
display: flex;
flex-wrap: wrap;
......@@ -81,6 +87,11 @@
font-size: 24rpx;
border: 2rpx solid #3582ee3d;
border-radius: 8rpx;
margin-right: 4rpx;
}
.card-box .content:nth-child(3n) {
margin-right: 0;
}
.card-box .content.appr-btn {
......
......@@ -140,13 +140,17 @@ Page({
let _userPortrait = []
CONSTANTDATA.formData.forEach(item => {
if (info[item.name]) {
if (item.isMult) {
let _list = info[item.name].split(',')
_list.forEach(n => {
_userPortrait.push(item.optionList.find(k => k.confId == n).confName)
})
if (item.type == 'textarea') {
_userPortrait.push(info[item.name])
} else {
_userPortrait.push(item.optionList.find(k => k.confId == info[item.name])?.otherName || item.optionList.find(k => k.confId == info[item.name])?.confName)
if (item.isMult) {
let _list = info[item.name].split(',')
_list.forEach(n => {
_userPortrait.push(item.optionList.find(k => k.confId == n).confName)
})
} else {
_userPortrait.push(item.optionList.find(k => k.confId == info[item.name])?.otherName || item.optionList.find(k => k.confId == info[item.name])?.confName)
}
}
}
})
......
// tabDate/pages/index/index.js
import api from '../../api'
const app = getApp()
const TABLIST = ['全部', '已预约', '待预约']
Page({
/**
* 页面的初始数据
......@@ -50,7 +51,7 @@ Page({
color: '#FF7D12'
},
5: {
text: '过期到店',
text: '超时未到店',
color: '#FF7D12'
},
6: {
......@@ -303,9 +304,9 @@ Page({
api.getiIviteRecord(params).then(res => {
let { data } = res
this.setData({
['tabList[0]']: this.data.tabList[0] + '(' + (data.inviteCount || 0) + ')',
['tabList[1]']: this.data.tabList[1] + '(' + (data.hadInvitedCount || 0) + ')',
['tabList[2]']: this.data.tabList[2] + '(' + (data.notInvitedCount || 0) + ')'
['tabList[0]']: TABLIST[0] + '(' + (data.inviteCount || 0) + ')',
['tabList[1]']: TABLIST[1] + '(' + (data.hadInvitedCount || 0) + ')',
['tabList[2]']: TABLIST[2] + '(' + (data.notInvitedCount || 0) + ')'
})
})
},
......
......@@ -31,7 +31,7 @@
<view class="list-bar">
<view>今日预约 · <span class="txt-blue">{{inviteObj.dayInvited || 0}}</span></view>
<view>本周预约 · <span class="txt-blue">{{inviteObj.weekInvited || 0}}</span></view>
<view>过期到店 · <span class="txt-blue">{{inviteObj.overdue || 0}}</span></view>
<view>超时未到店 · <span class="txt-blue">{{inviteObj.overdue || 0}}</span></view>
<image class="icon-cal" src="/images/icon-cal.png" bindtap="jump" data-item="{}" data-name="apprManage"/>
</view>
<block wx:if="{{flag}}">
......
......@@ -119,8 +119,10 @@ var formData = [{
optionsName: 'timeList'
}, {
label: '自定义信息',
name: '',
type: 'textArea'
name: 'additionalInformation',
type: 'textarea',
maxlength: '100',
placeholder: '输入职业画像、喜好禁忌、推膜建议等客户信息,不超过100字'
}]
export default {
......
......@@ -8,7 +8,10 @@ Page({
*/
data: {
detail: {},
formData: CONSTANTDATA.formData
formData: CONSTANTDATA.formData,
detailForm: {
additionalInformation: ''
}
},
click(e) {
let { pidx, idx } = e.currentTarget.dataset
......@@ -24,17 +27,31 @@ Page({
})
},
handleInput(e) {
let { attr } = e.currentTarget.dataset
let { value } = e.detail
this.setData({
['detailForm.' + attr]: value
})
},
recoverPortrait(info) {
let { formData } = this.data
formData.forEach(item => {
if (info[item.name]) {
if (item.isMult) {
let _list = info[item.name].split(',')
_list.forEach(n => {
item.optionList.find(k => k.confId == n).active = true
if (item.type == 'textarea') {
this.setData({
['detailForm.' + item.name]: info[item.name]
})
} else {
item.optionList.find(k => k.confId == info[item.name]).active = true
if (item.isMult) {
let _list = info[item.name].split(',')
_list.forEach(n => {
item.optionList.find(k => k.confId == n).active = true
})
} else {
item.optionList.find(k => k.confId == info[item.name]).active = true
}
}
}
})
......@@ -63,9 +80,10 @@ Page({
},
confirm() {
let { detail } = this.data
let { detail, detailForm } = this.data
let params = {
...this.dealParam(),
...detailForm,
id: detail.customerId
}
api.updateProfile(params).then(res => {
......
......@@ -2,6 +2,9 @@
<view class="user-portrait">
<view wx:for="{{formData}}" wx:key="index">
<view class="label">{{item.label}}</view>
<view class="input-box" wx:if="{{item.type == 'textarea'}}">
<textarea type="text" placeholder="{{item.placeholder || '请输入' + item.label}}" maxlength="{{item.maxlength}}" class="input" value="{{detailForm[item.name]}}" placeholder-class="input-placeholder" data-attr="{{item.name}}" bindinput="handleInput" />
</view>
<view wx:if="{{item.optionList}}" class="check-block">
<view class="check-box {{subItem.active ? 'active' : ''}}" wx:for="{{item.optionList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" bindtap="click" data-pidx="{{index}}" data-idx="{{idx}}">
{{subItem.confName}}
......
......@@ -42,6 +42,18 @@
height: 20rpx;
}
.input-box {
height: 280rpx;
background: #F4F5F7;
border: 2rpx solid #EFF0F2;
border-radius: 12rpx;
padding: 32rpx 24rpx;
margin-bottom: 16rpx;
color: #323436;
}
.user-portrait .check-box:nth-child(3n) {
margin-right: 0;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!