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