Commit b04dc71a by 李伟康

commit 提交

1 parent 8037269f
...@@ -11,7 +11,7 @@ module.exports = { ...@@ -11,7 +11,7 @@ module.exports = {
}); });
}, },
/**查询当前门店客户档案列表 */ /**查询当前门店客户档案列表 */
getCustomerFileList(data) { getCustomerFileList (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.customerInfoPage', method: 'dj.api.smartcarlife.customervisits.customerInfoPage',
projectName: "boutique", projectName: "boutique",
...@@ -19,7 +19,7 @@ module.exports = { ...@@ -19,7 +19,7 @@ module.exports = {
}); });
}, },
/* 删除客户档案*/ /* 删除客户档案*/
delCustomerFile(data) { delCustomerFile (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.deleteVisitsInfo', method: 'dj.api.smartcarlife.customervisits.deleteVisitsInfo',
projectName: "boutique", projectName: "boutique",
...@@ -27,7 +27,7 @@ module.exports = { ...@@ -27,7 +27,7 @@ module.exports = {
}); });
}, },
/** 根据业务查询接待场景 */ /** 根据业务查询接待场景 */
findAllSence(data) { findAllSence (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.findAllSence', method: 'dj.api.smartcarlife.customervisits.findAllSence',
projectName: "boutique", projectName: "boutique",
...@@ -35,7 +35,7 @@ module.exports = { ...@@ -35,7 +35,7 @@ module.exports = {
}); });
}, },
/**根据业务查询客户标签 */ /**根据业务查询客户标签 */
findCustomerTags(data) { findCustomerTags (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.findSenceTag', method: 'dj.api.smartcarlife.customervisits.findSenceTag',
projectName: "boutique", projectName: "boutique",
...@@ -45,7 +45,7 @@ module.exports = { ...@@ -45,7 +45,7 @@ module.exports = {
/** /**
* 查询客户档案详情 * 查询客户档案详情
*/ */
findVisitsInfo(data) { findVisitsInfo (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.findVisitsInfo', method: 'dj.api.smartcarlife.customervisits.findVisitsInfo',
projectName: "boutique", projectName: "boutique",
...@@ -55,7 +55,7 @@ module.exports = { ...@@ -55,7 +55,7 @@ module.exports = {
/* /*
* 保存客户档案 * 保存客户档案
*/ */
saveVisitsInfo(data) { saveVisitsInfo (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.saveVisitsInfo', method: 'dj.api.smartcarlife.customervisits.saveVisitsInfo',
projectName: "boutique", projectName: "boutique",
...@@ -65,11 +65,29 @@ module.exports = { ...@@ -65,11 +65,29 @@ module.exports = {
/** /**
* 更新客户档案 * 更新客户档案
*/ */
updateVisitsInfo(data) { updateVisitsInfo (data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.customervisits.updateVisitsInfo', method: 'dj.api.smartcarlife.customervisits.updateVisitsInfo',
projectName: "boutique", projectName: "boutique",
...data, ...data,
}); });
}, },
/**查询客户档案列表 */
getCustomerInfoList (data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.customerInfoList',
projectName: "boutique",
...data,
});
},
/**接待客户素材
*
*/
getMaterialResponsePage (data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.getMaterialResponsePage',
projectName: "boutique",
...data,
});
},
} }
\ No newline at end of file \ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
.icon-bao { width: 196rpx; height: 220rpx; background-position: -830rpx -382rpx;} .icon-bao { width: 196rpx; height: 220rpx; background-position: -830rpx -382rpx;}
.icon-byd { width: 184rpx; height: 36rpx; background-position: -1041rpx -557rpx;} .icon-byd { width: 184rpx; height: 36rpx; background-position: -1041rpx -557rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -1259rpx -617rpx;} .icon-change-account { width: 32rpx; height: 32rpx; background-position: -1259rpx -617rpx;}
.icon-clone { width: 24rpx; height: 24rpx; background-position: -1285rpx -668rpx;} .icon-clone { width: 24rpx; height: 24rpx; background-position: -781rpx -509rpx;}
.icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;} .icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;}
.icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -415rpx 0rpx;} .icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -415rpx 0rpx;}
.icon-customer-add { width: 80rpx; height: 80rpx; background-position: -1216rpx -382rpx;} .icon-customer-add { width: 80rpx; height: 80rpx; background-position: -1216rpx -382rpx;}
...@@ -23,18 +23,18 @@ ...@@ -23,18 +23,18 @@
.icon-first-nav { width: 464rpx; height: 176rpx; background-position: -830rpx -191rpx;} .icon-first-nav { width: 464rpx; height: 176rpx; background-position: -830rpx -191rpx;}
.icon-home-active { width: 112rpx; height: 112rpx; background-position: -127rpx -726rpx;} .icon-home-active { width: 112rpx; height: 112rpx; background-position: -127rpx -726rpx;}
.icon-home { width: 112rpx; height: 112rpx; background-position: -254rpx -726rpx;} .icon-home { width: 112rpx; height: 112rpx; background-position: -254rpx -726rpx;}
.icon-icon-arrow { width: 32rpx; height: 32rpx; background-position: -1050rpx -668rpx;} .icon-icon-arrow { width: 32rpx; height: 32rpx; background-position: -1160rpx -668rpx;}
.icon-icon-close { width: 72rpx; height: 72rpx; background-position: -285rpx -964rpx;} .icon-icon-close { width: 72rpx; height: 72rpx; background-position: -285rpx -964rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -1097rpx -668rpx;} .icon-icon-female { width: 32rpx; height: 32rpx; background-position: -1207rpx -668rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -1144rpx -668rpx;} .icon-icon-male { width: 32rpx; height: 32rpx; background-position: -1254rpx -668rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -1191rpx -668rpx;} .icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -781rpx -415rpx;}
.icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -503rpx -415rpx;} .icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -503rpx -415rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -1238rpx -668rpx;} .icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -781rpx -462rpx;}
.icon-invisible { width: 40rpx; height: 40rpx; background-position: -885rpx -668rpx;} .icon-invisible { width: 40rpx; height: 40rpx; background-position: -885rpx -668rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -781rpx -415rpx;} .icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -765rpx -621rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -781rpx -462rpx;} .icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -476rpx -853rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -765rpx -621rpx;} .icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -523rpx -853rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -476rpx -853rpx;} .icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -570rpx -853rpx;}
.icon-logo { width: 160rpx; height: 160rpx; background-position: -1041rpx -382rpx;} .icon-logo { width: 160rpx; height: 160rpx; background-position: -1041rpx -382rpx;}
.icon-mask-del { width: 80rpx; height: 80rpx; background-position: -95rpx -964rpx;} .icon-mask-del { width: 80rpx; height: 80rpx; background-position: -95rpx -964rpx;}
.icon-mask-edit { width: 80rpx; height: 80rpx; background-position: -190rpx -964rpx;} .icon-mask-edit { width: 80rpx; height: 80rpx; background-position: -190rpx -964rpx;}
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
.icon-qw { width: 48rpx; height: 48rpx; background-position: -765rpx -558rpx;} .icon-qw { width: 48rpx; height: 48rpx; background-position: -765rpx -558rpx;}
.icon-record-active { width: 112rpx; height: 112rpx; background-position: -381rpx -726rpx;} .icon-record-active { width: 112rpx; height: 112rpx; background-position: -381rpx -726rpx;}
.icon-record { width: 112rpx; height: 112rpx; background-position: -508rpx -726rpx;} .icon-record { width: 112rpx; height: 112rpx; background-position: -508rpx -726rpx;}
.icon-scan { width: 32rpx; height: 32rpx; background-position: -523rpx -853rpx;} .icon-scan { width: 32rpx; height: 32rpx; background-position: -617rpx -853rpx;}
.icon-scene-0 { width: 96rpx; height: 96rpx; background-position: 0rpx -853rpx;} .icon-scene-0 { width: 96rpx; height: 96rpx; background-position: 0rpx -853rpx;}
.icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -111rpx -853rpx;} .icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -111rpx -853rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -940rpx -668rpx;} .icon-search { width: 40rpx; height: 40rpx; background-position: -940rpx -668rpx;}
...@@ -56,5 +56,7 @@ ...@@ -56,5 +56,7 @@
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -451rpx -964rpx;} .icon-tool-file { width: 60rpx; height: 60rpx; background-position: -451rpx -964rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -526rpx -964rpx;} .icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -526rpx -964rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -601rpx -964rpx;} .icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -601rpx -964rpx;}
.icon-total { width: 32rpx; height: 32rpx; background-position: -570rpx -853rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -995rpx -668rpx;}
\ No newline at end of file \ No newline at end of file
.icon-total { width: 32rpx; height: 32rpx; background-position: -664rpx -853rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -995rpx -668rpx;}
.icon-play { width: 40rpx; height: 40rpx; background-position: -1050rpx -668rpx;}
.icon-pause { width: 40rpx; height: 40rpx; background-position: -1105rpx -668rpx;}
\ No newline at end of file \ No newline at end of file

1.19 MB | W: | H:

1.19 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<view :class="['customer-box',{'is-show':showCustomerBox}]">
<view class="customer-title">客户档案的记录</view>
<scroll-view
scroll-y
class="scroll-box"
>
<template v-if="loading">
<view class="loading flex">
<uni-icons
type="refreshempty"
:size="46"
color="#3773F8"
class="icon"
></uni-icons>
</view>
</template>
<template v-else>
<template v-if="searchList.length">
<template v-for="(i,index) in searchList">
<view
class="item flex"
:key="index"
hover-class="active"
@click="$emit('choose',i)"
>
{{ `${showType == 'tel'?i.ownerPhone:i.ownerName}`}}
</view>
</template>
</template>
<template v-else>
<view class="loading flex">
暂无
</view>
</template>
</template>
</scroll-view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'CustomerAutocomplete',
props: {
searchValue: String,
showType: String,
show: Boolean
},
data () {
return {
loading: true,
searchList: []
}
},
watch: {
showCustomerBox: {
immediate: true,
handler (newval) {
if (newval) this.getCustomerInfoList(this.searchValue, this.showType)
}
}
},
computed: {
showCustomerBox () {
return this.show && this.haveCustomerAccess && this.searchValue
},
haveCustomerAccess () {
return this.$store.state.user.haveCustomerAccess
}
},
mounted () {
},
methods: {
async getCustomerInfoList (val, type) {
try {
this.loading = true
const { shopMerchantId, sceneType } = uni.$storage.get("userInfo"),
params = {
merchantId: shopMerchantId,
bussinessScene: sceneType == 0 ? 1 : 2 // 1.延保 2.轻改
}
if (type == 'tel') params.ownerPhone = val
else params.ownerName = val
this.searchList = await uni.$api.customerApi.getCustomerInfoList(params)
this.loading = false
} catch (error) {
this.loading = false
}
}
}
}
</script>
<style scoped lang='scss'>
.customer-box {
position: absolute;
left: 0;
top: 88rpx;
width: 100%;
height: 236rpx;
background: #ffffff;
border-radius: 16rpx;
opacity: 0;
z-index: -1;
.customer-title {
font-size: 28rpx;
color: #999999;
line-height: 40rpx;
padding: 16rpx 24rpx 8rpx;
}
.scroll-box {
height: calc(100% - 64rpx);
.loading {
width: 100%;
height: 100%;
justify-content: center;
color: #999999;
.icon {
animation: rotate-loading 1s linear infinite;
}
}
.item {
width: 100%;
height: 48rpx;
font-size: 28rpx;
color: #333333;
line-height: 40rpx;
padding-left: 24rpx;
margin-bottom: 8rpx;
}
.active {
background: #ecf1ff;
}
@keyframes rotate-loading {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
}
}
.is-show {
opacity: 1;
z-index: 2;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -261,11 +261,14 @@ export default { ...@@ -261,11 +261,14 @@ export default {
mask: true mask: true
}) })
let { dateList, dateIndex, pageNum, pageSize, firstIndex } = this, let { dateList, dateIndex, pageNum, pageSize, firstIndex } = this,
{ shopMerchantId, sceneType } = uni.$storage.get("userInfo"),
{ startTime, endTime } = dateList[dateIndex], { startTime, endTime } = dateList[dateIndex],
params = { params = {
pageNum, pageNum,
pageSize, pageSize,
receptionStatus: firstIndex == 0 ? 1 : 2 receptionStatus: firstIndex == 0 ? 1 : 2,
merchantId: shopMerchantId,
bussinessScene: sceneType == 0 ? 1 : 2 // 1.延保 2.轻改
} }
if (firstIndex == 0 && startTime && endTime) { if (firstIndex == 0 && startTime && endTime) {
params.startTime = startTime params.startTime = startTime
......
...@@ -290,11 +290,12 @@ export default { ...@@ -290,11 +290,12 @@ export default {
e.error = false e.error = false
}) })
let { customerInfo, customerForm, customerTag } = this, let { customerInfo, customerForm, customerTag } = this,
{ shopMerchantId } = uni.$storage.get("userInfo"), { shopMerchantId,sceneType } = uni.$storage.get("userInfo"),
targetApi = customerInfo.id ? 'updateVisitsInfo' : 'saveVisitsInfo', targetApi = customerInfo.id ? 'updateVisitsInfo' : 'saveVisitsInfo',
params = { params = {
customerTag, customerTag,
merchantId: shopMerchantId merchantId: shopMerchantId,
bussinessScene: sceneType == 0 ? 1 : 2 // 1.延保 2.轻改
} }
if (!phoneRex.test(customerInfo.ownerPhone)) throw 'ownerPhone' if (!phoneRex.test(customerInfo.ownerPhone)) throw 'ownerPhone'
customerForm.map(e => { customerForm.map(e => {
......
...@@ -90,6 +90,7 @@ export default { ...@@ -90,6 +90,7 @@ export default {
label: "客户档案", label: "客户档案",
icon: "customer-file", icon: "customer-file",
}) })
this.$store.state.user.haveCustomerAccess = res
} }
} }
} }
......
...@@ -27,6 +27,12 @@ ...@@ -27,6 +27,12 @@
@focus="focusIndex = index" @focus="focusIndex = index"
@blur="resetFocusIndex" @blur="resetFocusIndex"
/> />
<customer-autocomplete
:showType="i.inputType"
:searchValue="customerInfo[i.key]"
:show="focusIndex == index"
@choose="chooseCustomer"
/>
</template> </template>
<template v-else> <template v-else>
<view <view
...@@ -165,10 +171,11 @@ import Employee from '@/components/Employee.vue' ...@@ -165,10 +171,11 @@ import Employee from '@/components/Employee.vue'
import CarBrands from '@/components/CarBrands.vue' import CarBrands from '@/components/CarBrands.vue'
import QrBox from './QrBox.vue' import QrBox from './QrBox.vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import CustomerAutocomplete from '@/components/CustomerAutocomplete.vue'
const phoneRex = /^[1]([3-9])[0-9]{9}$/; const phoneRex = /^[1]([3-9])[0-9]{9}$/;
export default { export default {
name: 'Reception', name: 'Reception',
components: { Employee, CarBrands, QrBox }, components: { Employee, CarBrands, QrBox, CustomerAutocomplete },
props: { props: {
views: Array, views: Array,
customerType: Number, customerType: Number,
...@@ -471,6 +478,15 @@ export default { ...@@ -471,6 +478,15 @@ export default {
merchantIdList merchantIdList
}) })
return list || [] return list || []
},
chooseCustomer (e) {
this.customerInfo = {
...this.customerInfo,
phoneNumber: e.ownerPhone,
customerName: e.ownerName,
carModel: e.brandModel
}
this.inputCustomer()
} }
} }
} }
...@@ -485,9 +501,9 @@ export default { ...@@ -485,9 +501,9 @@ export default {
top: 0; top: 0;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-image: url("@/assets/images/boutique/reception-bg.webp"); background-image: url('@/assets/images/boutique/reception-bg.webp');
background-size: 100% 100%; background-size: 100% 100%;
content: ""; content: '';
z-index: -1; z-index: -1;
} }
.title { .title {
...@@ -559,7 +575,7 @@ export default { ...@@ -559,7 +575,7 @@ export default {
top: -2rpx; top: -2rpx;
width: calc(100% + 4rpx); width: calc(100% + 4rpx);
height: calc(100% + 4rpx); height: calc(100% + 4rpx);
content: ""; content: '';
background-image: linear-gradient(#2f6af7, #75bcff); background-image: linear-gradient(#2f6af7, #75bcff);
box-shadow: 0 0 0 8rpx #2c66f71a; box-shadow: 0 0 0 8rpx #2c66f71a;
border-radius: 16rpx; border-radius: 16rpx;
......
<template>
<view class="audio-box flex">
<view
:class="['sprite-icon',`${paused? 'icon-play' : 'icon-pause'}`]"
@click="play"
></view>
<view class="line"></view>
<view class="duration">{{currentTime}}/{{duration}}</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'AudioComponent',
props: {
src: String
},
data () {
return {
innerAudioContext: null,
currentTime: '00:00',
duration: '00:00'
}
},
watch: {
src: {
immediate: true,
handler (newval) {
if (newval) this.init(newval)
}
},
},
computed: {
paused () {
return this.innerAudioContext?.paused // 当前是是否暂停或停止状态,true 表示暂停或停止,false 表示正在播放
}
},
mounted () {
},
methods: {
init (src) {
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.src = src
innerAudioContext.onCanplay(this.onCanplay)
this.innerAudioContext = innerAudioContext
},
onCanplay () {
this.duration = this.formatTime(this.innerAudioContext.duration)
},
formatTime (num) {
num = Math.floor(num);
let minutes = Math.floor(num / 60) || '0',
seconds = num % 60 || '0'
seconds = seconds < 10 ? `0${seconds}` : seconds
return `${minutes}:${seconds}`
},
play () {
const {
paused
} = this
if (paused) this.innerAudioContext.play()
}
}
}
</script>
<style scoped lang='scss'>
.audio-box {
width: 1120rpx;
height: 80rpx;
background-image: url('@/assets/images/common/audio-bg.webp');
background-size: 100%;
margin-bottom: 24rpx;
box-sizing: border-box;
padding: 0 32rpx;
font-size: 28rpx;
color: #333333;
.sprite-icon {
margin-right: 16rpx;
}
.line {
width: 796rpx;
height: 6rpx;
background: #d8d8d8;
border-radius: 4rpx;
position: relative;
}
.duration {
margin-left: auto;
flex-shrink: 0;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -31,35 +31,46 @@ ...@@ -31,35 +31,46 @@
<view class="case-box box"> <view class="case-box box">
<view class="title flex"> <view class="title flex">
营销话术方案 营销话术方案
<view
:class="['search-btn flex',{'arrow-popup':arrowPopup}]"
@click="showPopup"
>家庭车主的延保套餐营销案</view>
</view> </view>
<view class="case-list"> <view class="case-list">
<template v-for="(item, index) in 20"> <template v-if="flag">
<view <template v-if="list.length && list[0] && list[0].length">
class="case-item" <template v-for="i in list">
:key="index" <template v-for="(item,cindex) in i">
@click="jumpDetail(item)"
>
<image
class="img"
src="http://192.168.3.233:8090/uploads/user/avatar/25/avatar.png"
></image>
<view class="case-info">
<view class="case-name text-hide">家庭车主的延保套餐营销案</view>
<template v-for="(i,ind) in caseInfo">
<view <view
class="case-text flex" class="case-item"
:key="ind" :key="cindex"
@click="jumpDetail(item)"
> >
<view class="case-label">{{i.label}}:</view> <image
<view :class="['case-value',i.class]">M5原厂延保MAX套餐(4年)、M7原厂延保MAX套餐(4年)</view> class="img"
src="http://192.168.3.233:8090/uploads/user/avatar/25/avatar.png"
></image>
<view class="case-info">
<view class="case-name text-hide">家庭车主的延保套餐营销案</view>
<template v-for="(j,ind) in caseInfo">
<view
class="case-text flex"
:key="ind"
>
<view class="case-label">{{j.label}}:</view>
<view :class="['case-value',j.class]">M5原厂延保MAX套餐(4年)、M7原厂延保MAX套餐(4年)</view>
</view>
</template>
</view>
</view> </view>
</template> </template>
</template>
</template>
<template v-else>
<view class="nothing flex">
<image
class="icon"
src="@/assets/images/home/nothing.webp"
/>
暂无营销话术方案
</view> </view>
</view> </template>
</template> </template>
<template v-if="nothing"> <template v-if="nothing">
<view class="end-text">到底了!</view> <view class="end-text">到底了!</view>
...@@ -67,11 +78,11 @@ ...@@ -67,11 +78,11 @@
</view> </view>
</view> </view>
<package-popup <!-- <package-popup
ref="packageVisible" ref="packageVisible"
@select="handleSearch" @select="handleSearch"
@close="arrowPopup = false" @close="arrowPopup = false"
></package-popup> ></package-popup> -->
</view> </view>
</template> </template>
...@@ -127,7 +138,13 @@ export default { ...@@ -127,7 +138,13 @@ export default {
], ],
customerInfo: {}, customerInfo: {},
arrowPopup: false, arrowPopup: false,
nothing: true nothing: true,
list: [],
currentPage: 1,
total: 0,
flag: false,
nothing: false,
pageSize: 8,
} }
}, },
onLoad (options) { onLoad (options) {
...@@ -156,13 +173,47 @@ export default { ...@@ -156,13 +173,47 @@ export default {
customerInfo.customerTagName = customerInfo.customerTagName.replace(/,/g, '|') customerInfo.customerTagName = customerInfo.customerTagName.replace(/,/g, '|')
customerInfo.arrivalDate = dayjs(customerInfo.arrivalDate).format("YYYY.MM.DD") customerInfo.arrivalDate = dayjs(customerInfo.arrivalDate).format("YYYY.MM.DD")
this.customerInfo = customerInfo this.customerInfo = customerInfo
this.getMaterialResponsePage()
}, },
showPopup () { showPopup () {
this.arrowPopup = true this.arrowPopup = true
this.$refs.packageVisible.open() this.$refs.packageVisible.open()
}, },
handleSearch (e) { async getMaterialResponsePage () {
try {
uni.showLoading({
mask: true
})
let { shopMerchantId, sceneType } = uni.$storage.get("userInfo"),
{ customerInfo: { receptionScene, customerTag }, pageSize, currentPage } = this,
customerLabelList = []
customerTag.split(',')?.map(e => customerLabelList.push({
labelId: e
}))
let params = {
currentPage,
pageSize,
receptionScene,
status: 1,
receptionSceneInfoList: [
{ receptionSceneId: receptionScene }
],
customerLabelList,
merchantId: shopMerchantId,
showChannel: 2,
scene: sceneType
}
console.log(params)
const { list, total } = await uni.$api.customerApi.getMaterialResponsePage(params)
uni.hideLoading()
this.list[currentPage - 1] = list
this.flag = true
this.total = total
} catch (error) {
uni.hideLoading()
console.log(error)
this.flag = true
}
}, },
back () { back () {
uni.navigateBack({ uni.navigateBack({
...@@ -171,11 +222,19 @@ export default { ...@@ -171,11 +222,19 @@ export default {
animationDuration: 100 animationDuration: 100
}) })
}, },
jumpDetail(item){ jumpDetail (item) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/common/caseDetail?` url: `/pages/common/caseDetail?`
}) })
} },
pageonReachBottom () {
let { currentPage, total, nothing, pageSize } = this
if (!nothing) nothing = 'nothing'
if (Math.ceil(total / pageSize) > currentPage) {
this.currentPage += 1
this.getMaterialResponsePage()
} else this.nothing = true
},
} }
} }
</script> </script>
...@@ -318,6 +377,18 @@ export default { ...@@ -318,6 +377,18 @@ export default {
} }
} }
} }
.nothing {
width: 100%;
flex-direction: column;
margin-top: 112rpx;
font-size: 28rpx;
color: #999999;
.icon {
width: 676rpx;
height: 284rpx;
margin-bottom: 24rpx;
}
}
.end-text { .end-text {
width: 100%; width: 100%;
text-align: center; text-align: center;
......
...@@ -35,6 +35,12 @@ ...@@ -35,6 +35,12 @@
@focus="focusIndex = index" @focus="focusIndex = index"
@blur="resetFocusIndex" @blur="resetFocusIndex"
/> />
<customer-autocomplete
:showType="i.inputType"
:searchValue="customerInfo[i.key]"
:show="focusIndex == index"
@choose="chooseCustomer"
/>
</template> </template>
<template v-else> <template v-else>
<view <view
...@@ -83,8 +89,9 @@ ...@@ -83,8 +89,9 @@
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import CarBrands from '@/components/CarBrands.vue' import CarBrands from '@/components/CarBrands.vue'
import CustomerAutocomplete from '@/components/CustomerAutocomplete.vue'
export default { export default {
components: { CarBrands }, components: { CarBrands, CustomerAutocomplete },
props: { props: {
penSwitch: Boolean, penSwitch: Boolean,
show: Boolean, show: Boolean,
...@@ -167,6 +174,15 @@ export default { ...@@ -167,6 +174,15 @@ export default {
resetFocusIndex () { resetFocusIndex () {
this.focusIndex = -1 this.focusIndex = -1
}, },
chooseCustomer (e) {
this.customerInfo = {
...this.customerInfo,
phoneNumber: e.ownerPhone,
customerName: e.ownerName,
carModel: e.brandModel
}
this.inputCustomer()
}
} }
} }
</script> </script>
...@@ -194,6 +210,8 @@ export default { ...@@ -194,6 +210,8 @@ export default {
.form-box { .form-box {
height: 80rpx; height: 80rpx;
padding: 0 110rpx; padding: 0 110rpx;
position: relative;
z-index: 1;
.form { .form {
display: flex; display: flex;
gap: 0 28rpx; gap: 0 28rpx;
...@@ -293,7 +311,7 @@ export default { ...@@ -293,7 +311,7 @@ export default {
.content { .content {
.form-box { .form-box {
position: fixed; position: fixed;
right: 72rpx; right: 184rpx;
top: 188rpx; top: 188rpx;
padding: 0; padding: 0;
} }
......
...@@ -228,16 +228,16 @@ export default { ...@@ -228,16 +228,16 @@ export default {
this.moduleList[index].showAlt = true; this.moduleList[index].showAlt = true;
}, },
async start () { async start () {
const result = await this.$permision.requestAndroidPermission( // const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO" // "android.permission.RECORD_AUDIO"
); // );
if (result !== 1) { // if (result !== 1) {
uni.showToast({ // uni.showToast({
title: "为了记录语音通话,请打开录音权限", // title: "为了记录语音通话,请打开录音权限",
icon: "none", // icon: "none",
}); // });
return; // return;
} // }
this.getSoure(); this.getSoure();
this.clearHistory(); this.clearHistory();
this.$refs.home.startAudio(); this.$refs.home.startAudio();
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// import { setToken, getToken, removeToken } from '@/utils/token';; // import { setToken, getToken, removeToken } from '@/utils/token';;
export default { export default {
state() { state () {
return { return {
customerInfo: { customerInfo: {
customerName: "", customerName: "",
...@@ -17,24 +17,25 @@ export default { ...@@ -17,24 +17,25 @@ export default {
phoneNumber: "", phoneNumber: "",
salesUuid: "", salesUuid: "",
staffName: "", staffName: "",
newCarFare:'' newCarFare: ''
}, },
historyStatus: Date.now(), historyStatus: Date.now(),
carBrands: [], carBrands: [],
employeeList: [], employeeList: [],
paymentType: [], paymentType: [],
haveCustomerAccess: false,
}; };
}, },
mutations: { mutations: {
getCustomerInfo(state) { getCustomerInfo (state) {
return state.customerInfo; return state.customerInfo;
}, },
setCustomerInfo(state, data) { setCustomerInfo (state, data) {
// state.customerInfo = data; // state.customerInfo = data;
uni.$storage.set("customerInfo", JSON.stringify(data)); uni.$storage.set("customerInfo", JSON.stringify(data));
state.customerInfo = JSON.parse(uni.$storage.get("customerInfo") || "{}"); state.customerInfo = JSON.parse(uni.$storage.get("customerInfo") || "{}");
}, },
clearCustomerInfo(state) { clearCustomerInfo (state) {
const info = { const info = {
customerName: "", customerName: "",
carBrand: "", carBrand: "",
...@@ -42,7 +43,7 @@ export default { ...@@ -42,7 +43,7 @@ export default {
phoneNumber: "", phoneNumber: "",
salesUuid: "", salesUuid: "",
staffName: "", staffName: "",
newCarFare:'' newCarFare: ''
}; };
uni.$storage.set("customerInfo", JSON.stringify(info)); uni.$storage.set("customerInfo", JSON.stringify(info));
state.customerInfo = JSON.parse(uni.$storage.get("customerInfo") || "{}"); state.customerInfo = JSON.parse(uni.$storage.get("customerInfo") || "{}");
...@@ -50,25 +51,25 @@ export default { ...@@ -50,25 +51,25 @@ export default {
}, },
actions: { actions: {
// 获取用户详情 // 获取用户详情
getCustomerInfo({ state }) { getCustomerInfo ({ state }) {
return state.customerInfo; return state.customerInfo;
}, },
setCustomerInfo({ commit }, value) { setCustomerInfo ({ commit }, value) {
commit("setCustomerInfo", value); commit("setCustomerInfo", value);
}, },
clearCustomerInfo({ commit }) { clearCustomerInfo ({ commit }) {
commit("clearCustomerInfo"); commit("clearCustomerInfo");
}, },
clearHistory({ state }) { clearHistory ({ state }) {
state.historyStatus = Date.now(); state.historyStatus = Date.now();
}, },
setPaymentType({ state }, value) { setPaymentType ({ state }, value) {
state.paymentType = value; state.paymentType = value;
}, },
setCarBrandsList({ state }, value) { setCarBrandsList ({ state }, value) {
state.carBrands = value; state.carBrands = value;
}, },
setEmployeeList({ state }, value) { setEmployeeList ({ state }, value) {
state.employeeList = value; state.employeeList = value;
}, },
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!