Commit becc7654 by 胡悦

Merge branch 'v1.0.5' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.5

2 parents b6b8cf61 adf7272e
......@@ -4,7 +4,7 @@ module.exports = {
/**获取APP更新 */
findSoureList (data) {
return http.post({
method: 'dj.api.smartcarlife.recepiton.soure.findSoureList',
method: "dj.api.smartcarlife.recepiton.soure.findSoureList",
projectName: "boutique",
...data,
});
......@@ -12,18 +12,39 @@ module.exports = {
/** 查询可发放礼券-分页查询商户券列表 */
findCouponList (data) {
return http.post({
method: 'dj.api.smartcarlife.merchantCoupon.pageForZYApp',
method: "dj.api.smartcarlife.merchantCoupon.pageForZYApp",
projectName: "boutique",
onlyUsable: true,
currentPage: 1,
pageSize: 99999,
...data,
});
},
/**查询用户是否领券 */
findCustomerReceivedStatus (data) {
return http.post({
method: 'dj.api.smartcarlife.customerCoupon.page',
method: "dj.api.smartcarlife.customerCoupon.pageForZYApp",
projectName: "boutique",
...data,
currentPage: 1,
pageSize: 99999,
statusList: [0, 1]
});
},
}
\ No newline at end of file
/**历史成交客户 */
historyDealOrderPage (data) {
return http.post({
method: "dj.api.smartcarlife.order.historyDealOrder.page",
projectName: "boutique",
...data,
});
},
/**客户邀约记录 */
customerInviteRecordPage (data) {
return http.post({
method: "dj.api.smartcarlife.customerInviteRecord.page",
projectName: "boutique",
...data,
});
},
};
import commonApi from './common'
import systemApi from './systemApi'
import userApi from './userApi'
import boutiqueApi from './boutique'
import commonApi from "./common";
import systemApi from "./systemApi";
import userApi from "./userApi";
import boutiqueApi from "./boutique";
module.exports = {
commonApi,
systemApi,
userApi,
boutiqueApi
}
\ No newline at end of file
boutiqueApi,
};
......@@ -11,7 +11,7 @@ const HOST = {
scrm: domain,
dj: djDomain,
merchant: merchantDomain,
ip: 'http://192.168.3.226:9711'
ip: 'http://192.168.1.169:8292'
};
class Request {
get (params, returnAll = false, hostType) {
......@@ -36,13 +36,13 @@ class Request {
let _this = this
uni.getNetworkType({
success (res) {
if(res.networkType == 'none'){
if (res.networkType == 'none') {
uni.hideLoading();
uni.showToast({
title:'网络异常',
icon: "error",
});
reject('网络异常');
uni.showToast({
title: '网络异常',
icon: "error",
});
reject('网络异常');
return
}
let header = RequestMethods === "POST"
......@@ -66,9 +66,10 @@ class Request {
success (response) {
/**业务代码 */
let {
data: { code, message },
data,
} = response;
} = response
if (!data) return reject()
let { code, message } = data
if (returnAll) {
resolve(data);
return;
......
......@@ -225,15 +225,6 @@ export default {
return this.$refs.finish
}
},
onBackPress (options) {
if (options.from === "backbutton") {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
return true;
}
// 其他情况允许正常返回
return false;
},
methods: {
changeIndex (index) {
this.tabIndex = index;
......
......@@ -41,6 +41,7 @@
v-if="isFooter"
>
<view
v-if="showCancelBtn"
class="tips-btn close"
@click="cancel()"
>{{
......@@ -106,7 +107,11 @@ export default {
default: "取消",
},
maxHeight: Number,
back: Boolean
back: Boolean,
showCancelBtn: {
type: Boolean,
default: true,
}
},
methods: {
close () {
......
......@@ -16,7 +16,7 @@ export default {
async getList(api, params) {
try {
uni.showLoading();
const { list, total } = await uni.$api.commonApi[api](params);
const { list, total } = await uni.$api.boutiqueApi[api](params);
uni.hideLoading();
this.list = [...(params.pageNum == 1 ? [] : this.list), ...list];
this.flag = true;
......
<template>
<view class="container">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="32"></uni-icons>
</view>
<view class="nav-title">客户案例中心</view>
</view>
<view class="box">
<view class="input-box">
<input
......@@ -25,81 +19,57 @@
@scroll="scroll"
>
<view class="list">
<template v-if="flag">
<template v-if="list.length">
<template v-for="item in list">
<view class="item" :key="item.id">
<view class="item-autio"></view>
<view class="item-desc">{{ item.title }}</view>
<template v-if="list.length">
<template v-for="item in list">
<view class="item" :key="item.id">
<view class="item-autio">
<image :src="item.detailUrl" class="cover-box"></image>
<image
src="../../assets/images/boutique/play.png"
class="play-box"
></image>
</view>
</template>
</template>
<template v-else>
<view class="nothing flex">
<image
class="icon"
src="../../assets/images/home/nothing.webp"
/>
暂无接待记录
<view class="item-desc">{{ item.tabName }}</view>
</view>
</template>
</template>
<template v-else>
<view class="nothing flex">
<image class="icon" src="../../assets/images/home/nothing.webp" />
暂无数据
</view>
</template>
</view>
<template v-if="nothing">
<view class="end-text">到底了!</view>
</template>
</scroll-view>
</view>
</view>
</template>
<script type="text/ecmascript-6">
import utils from "@/utils/utils";
export default {
name: '',
data () {
return {
name:'',
dateIndex: 0,
pageNum: 1,
total: 0,
list: [{
id:1,
carModel:1,
title: 'AITO问界 低盘护板套件(M7)加装效果',
receptionStatus:1
}],
itemObject: [
{ label: '客户电话', key: 'phoneNumber' },
{ label: '客户车型', key: 'salesName' },
{ label: '礼券名称', key: 'duration' },
{ label: '领券时间', key: 'startTime' },
{ label: '销售顾问', key: 'endTime' },
],
flag: true,
nothing: false,
pageSize: 18,
total:0,
sticky: false
list: [],
}
},
methods: {
//下拉分页
pageonReachBottom () {
let { pageNum, total, nothing, pageSize } = this
if (!nothing) nothing = 'nothing'
if (Math.ceil(total / pageSize) > pageNum) {
this.pageNum += 1
this.getList()
} else {
this.nothing = true
props: {
views: {
type: Array,
default: () => []
}
},
},
mounted() {
// this.list = utils.deepClone(this.views)
console.log(this.views)
this.list = this.views
},
methods: {
input(e) {
console.log(e.detail.value)
this.name = e.detail.value
this.list = this.views.filter(i=>i.tabName.includes(this.name))
},
getList() {
const {pageNum} = this
}
},
}
</script>
......@@ -112,32 +82,6 @@ export default {
height: 100vh;
background-image: linear-gradient(180deg, #f2f6ff 0%, #f7f9ff 100%);
overflow: hidden;
.nav-bar {
position: fixed;
width: 100%;
height: 96rpx;
left: 0;
top: 48rpx;
z-index: 9;
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
}
.nav-title {
font-weight: 600;
font-size: 32rpx;
color: #1a1a1a;
text-align: center;
line-height: 100%;
flex: 1;
}
}
.box {
padding: 64rpx;
margin-top: 120rpx;
......@@ -165,6 +109,18 @@ export default {
border-radius: 48rpx;
.item-autio {
height: 404rpx;
position: relative;
.cover-box {
width: 100%;
height: 100%;
}
.play-box {
width: 48rpx;
height: 48rpx;
position: absolute;
left: 32rpx;
bottom: 32rpx;
}
}
.item-desc {
height: 140rpx;
......@@ -176,4 +132,16 @@ export default {
}
}
}
.nothing {
width: 100vw;
flex-direction: column;
margin-top: 112rpx;
font-size: 28rpx;
color: #999999;
.icon {
width: 676rpx;
height: 284rpx;
margin-bottom: 24rpx;
}
}
</style>
......@@ -9,7 +9,7 @@
<view class="box">
<view
class="icon-close-box flex"
@click="$refs.qr.close()"
@click="close"
>
<uni-icons
class="icon-close"
......
......@@ -47,10 +47,10 @@
<view :class="['form-item' ,{active:focusIndex == 4}]">
<view class="form-item-box">
<view
:class="['select flex',{placeholderStyle:!couponName}]"
:class="['select flex',{placeholderStyle:!couponTypeName}]"
@click="showPopup('couponBoxVisible', 4)"
>
<view class="value text-hide">{{couponName|| '请选择礼券类型'}}</view>
<view class="value text-hide">{{couponTypeName|| '请选择礼券类型'}}</view>
<uni-icons
class="arrow"
type="right"
......@@ -107,19 +107,25 @@
<view class="select-box">
<view
class="select-item"
:class="{ checked: couponId == item.id }"
:class="{ checked: pageParams.couponId == item.id }"
@click="chooseCoupon(item)"
v-for="(item, index) in couponList"
:key="index"
>
{{ item.couponName }}
{{ item.couponTypeName }}
</view>
</view>
</MessageBox>
<MessageBox
ref="couponTips"
content="该门店礼券已使用完,请联系管理员配置。"
:showCancelBtn="false"
confirmBtnText="知道了"
></MessageBox>
<qr-box
:url="QRURL"
:url="pageParams.QRURL"
ref="qrbox"
:received="received"
:received="pageParams.received"
@close="closeQr"
/>
</view>
......@@ -172,25 +178,34 @@ export default {
],
customerInfo: {},
couponList: [],
couponName: '',
couponTypeName: '',
focusIndex: -1,
couponId: '',
carInfo: {},
QRURL: 'https://qcimg01.glsx.com.cn/group1/M00/06/B9/wKgD3mZcKDeAXECgAADCGbjApJQ653.png',
received: false,
qrTimer: null
pageParams: {
qrTimer: null,
received: false,
couponId: '',
carInfo: {},
QRURL: '',
}
}
},
mounted () {
if (this.show) this.init()
},
watch: {
watchCustomerInfo: {
immediate: true,
handler (newval) {
if (newval) this.customerInfo = newval
if (newval && this.show) this.customerInfo = newval
}
},
show (n) {
if (n && this.customerType == 1) this.init()
},
watchStatus: {
immediate: true,
handler (newval) {
this.pageParams = this.$options.data.call(this).pageParams
this.resetFocusIndex()
}
}
},
computed: {
watchCustomerInfo () {
......@@ -203,17 +218,35 @@ export default {
methods: {
init () {
this.qrTimer = null
this.resetFocusIndex()
this.findCouponList()
},
async findCouponList () {
const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo,
couponList = await uni.$api.boutiqueApi.findCouponList({
{ list } = await uni.$api.boutiqueApi.findCouponList({
merchantIdList: [shopMerchantId]
}),
arr = []
if (list && list.length) {
let couponTypeList = Array.from(new Set([...list.map((e) => e.couponType)]))
couponTypeList.map((i) => {
let item = []
list.map((e) => {
if (i == e.couponType) item.push(e)
})
if (item.length) arr.push(item.sort(function (a, b) {
return b.createdDate - a.createdDate
})[0])
})
this.couponList = couponList || []
let item = arr.find(e => e.couponType == 1),
item2 = arr.find(e => e.couponType == 18)
if (!this.pageParams.couponId) {
if (item) this.chooseCoupon(item) //默认填入类型为「太阳膜」类型
else if (item2) this.chooseCoupon(item) //次选填入「精品」类型
else this.chooseCoupon(arr[0]) // 无此两种类型情况默认带入任意类型礼券
}
} else this.$refs.couponTips.open()
this.couponList = arr
},
inputCustomer () {
this.$store.dispatch('setCustomerInfo', this.customerInfo)
......@@ -226,7 +259,7 @@ export default {
} else {
this.$refs.carBrandListVisible.close()
this.customerInfo.carModel = item.name
this.carInfo = item
this.pageParams.carInfo = item
}
this.resetFocusIndex()
this.$store.dispatch('setCustomerInfo', this.customerInfo)
......@@ -243,8 +276,8 @@ export default {
this.closeQr()
},
chooseCoupon (item) {
this.couponId = item.id
this.couponName = item.couponName
this.pageParams.couponId = item.id
this.couponTypeName = item.couponTypeName
this.$refs.couponBoxVisible.close()
},
jumpPage (e) {
......@@ -252,7 +285,7 @@ export default {
},
async createCoupon () {
try {
const { couponId, customerInfo, carInfo } = this
const { pageParams: { couponId, carInfo }, customerInfo } = this
await this.validate()
uni.showLoading()
const {
......@@ -260,16 +293,13 @@ export default {
name,
shopMerchantId
} = uni.$storage.get("userInfo")
let scene = `id=${couponId}&userId=${uuid}&employName=${name}&merchantId=${shopMerchantId}
&customerName=${customerInfo.customerName}&customerPhone=${customerInfo.phoneNumber}`,
let scene = `id=${couponId}&userId=${uuid}&employName=${name}&merchantId=${shopMerchantId}&customerName=${customerInfo.customerName}&customerPhone=${customerInfo.phoneNumber}`,
params = {
path: '/packageShopmall/packageMine/pages/boutique/gift/gift',
appId: 'wxe10067a63c1856ac',
}
if (carInfo.name) {
scene += `&carChildsBrandId=${carInfo.carChildsBrandId}&carChildsBrandName=${carInfo.carChildsBrandName}
&carBrandId=${carInfo.carBrandId}&carBrand=${carInfo.carBrand}
&carSeriesId=${carInfo.id}&carSeriesName=${carInfo.name}`
scene += `&carChildsBrandId=${carInfo.carChildsBrandId}&carChildsBrandName=${carInfo.carChildsBrandName}&carBrandId=${carInfo.carBrandId}&carBrand=${carInfo.carBrand}&carSeriesId=${carInfo.id}&carSeriesName=${carInfo.name}`
}
params.scene = scene
let {
......@@ -280,12 +310,12 @@ export default {
uni.hideLoading()
if (code == 0) {
if (data) {
this.QRURL = data
this.pageParams.QRURL = data
this.checkCustomerReceivedStatus(dayjs().format("YYYY-MM-DD HH:mm:ss"))
this.$refs.qrbox.open()
}
else throw '生成小程序码失败,请重试!'
} else throw message
console.log(data)
} catch (error) {
console.log(error)
uni.showToast({
......@@ -296,7 +326,7 @@ export default {
},
async validate () {
const { customerName, phoneNumber, carModel, staffName } = this.customerInfo,
{ couponId } = this
{ couponId } = this.pageParams
// 检查车主姓名
if (!customerName) throw '请输入车主姓名'
// 检查车主手机
......@@ -310,25 +340,34 @@ export default {
if (!couponId) throw '请选择礼券类型'
},
checkCustomerReceivedStatus (receiveCouponStartTime) {
this.qrTimer = setInterval(async () => {
const { couponId, customerInfo } = this,
res = await uni.$api.boutiqueApi.findCustomerReceivedStatus({
merchantCouponId: couponId,
customerPhone: customerInfo.phoneNumber,
receiveCouponStartTime
})
if (res.total) {
this.received = true
this.closeQr()
setTimeout(() => {
this.$refs.qrbox.close()
}, 3e3)
}
}, 1e3)
try {
this.pageParams.received = false
this.pageParams.qrTimer = setInterval(async () => {
const { pageParams: { couponId }, customerInfo } = this,
res = await uni.$api.boutiqueApi.findCustomerReceivedStatus({
merchantCouponId: couponId,
customerPhone: customerInfo.phoneNumber,
receiveCouponStartTime
})
if (res && res.total) {
this.pageParams.received = true
this.closeQr()
setTimeout(() => {
this.$refs.qrbox.close()
}, 3e3)
}
}, 1e3)
} catch (error) {
if (error) uni.showToast({
title: error,
icon: "none",
});
}
},
closeQr () {
clearInterval(this.qrTimer)
this.qrTimer = null
clearInterval(this.pageParams.qrTimer)
this.pageParams.qrTimer = null
},
resetFocusIndex () {
this.focusIndex = -1
......
......@@ -8,33 +8,23 @@
<template>
<view class="detail-box">
<view class="nav-bar">
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="24"
></uni-icons>
<view class="back" @click="back">
<uni-icons type="left" :size="24"></uni-icons>
</view>
<view class="title">{{title}}</view>
<view class="title">{{ title }}</view>
</view>
<template v-for="(item, index) in media">
<view
:class="['view', { showView: id == item.id }]"
:key="index"
>
<view :class="['view', { showView: id == item.id }]" :key="index">
<component
:is="componentName"
:is="componentName(item.id)"
:views="item.receptionSourceDetailList || []"
:ref="'media'+item.id"
:ref="'media' + item.id"
:title="item.detailTitle || ''"
:madiaId="item.id"
:customerType="customerType"
@jumpPage="jumpPage"
:show="id == item.id"
/>
<!-- <membranes :id="id"></membranes> -->
</view>
</template>
<template v-if="type != 'preview'">
......@@ -58,18 +48,20 @@
<script>
import ToolBox from "@/components/ToolBox.vue";
import myClick from "@/mixin/click";
import FinishStep from '@/components/FinishStep.vue';
import FinishStep from "@/components/FinishStep.vue";
import Membranes from "./membranes.vue";
import Reception from './components/Reception.vue'
import Reception from "./components/Reception.vue";
import { mapMutations } from "vuex";
import invitation from './invitation.vue';
import invitation from "./invitation.vue";
import Case from "./case.vue";
export default {
components: {
ToolBox,
FinishStep,
Membranes,
Reception,
invitation
invitation,
Case,
},
mixins: [myClick],
props: {
......@@ -77,66 +69,62 @@ export default {
media: Array,
type: {
type: String,
default: 'preview'
default: "preview",
},
customerType: Number
customerType: Number,
},
data () {
return {
finishVisible: false,
};
data() {
return {};
},
computed: {
title () {
title() {
let { id } = this,
name = this.media.find(e => e.id == id)?.shortTitle || ''
return name
name = this.media.find((e) => e.id == id)?.shortTitle || "";
return name;
},
watchStatus () {
return this.$store.state.user.historyStatus
watchStatus() {
return this.$store.state.user.historyStatus;
},
componentName () {
let { id } = this,
name = ''
if ([8, 10, 11].includes(id)) name = 'membranes'
else name = {
7: 'reception',
13: 'invitation'
}[id]
return name
}
},
mounted () {
},
mounted() {},
methods: {
...mapMutations("audio", ["setReceptionStatus"]),
open () {
this.$refs.stepRef.open()
componentName(id) {
let name = "";
if ([8, 10, 11].includes(id)) name = "membranes";
else
name = {
7: "reception",
13: "invitation",
9: "Case",
}[id];
return name;
},
open() {
this.$refs.stepRef.open();
},
/**切换素材 */
choose (e) {
if (this.id == 7) this.$refs.media7[0].closeAllPopup()
this.$emit('update:id', e.id)
choose(e) {
if (this.id == 7) this.$refs.media7[0].closeAllPopup();
this.$emit("update:id", e.id);
if (e.id == 2 || e.id == 4) {
// console.log(this.$refs[`media${e.id}`][0].$refs)
// this.$refs[`media${e.id}`][0].$refs.tabs.init()
}
},
back () {
this.$refs?.toolRef?.hide()
this.$emit('back')
back() {
this.$refs?.toolRef?.hide();
this.$emit("back");
},
done (e) {
this.$refs.toolRef.hide()
this.$refs.stepRef.close()
this.$emit('done', e)
done(e) {
this.$refs.toolRef.hide();
this.$refs.stepRef.close();
this.$emit("done", e);
},
jumpPage (id) {
this.$emit('update:id', Number(id))
},
pageonReachBottom () {
jumpPage(id) {
this.$emit("update:id", Number(id));
},
pageonReachBottom() {},
},
};
</script>
......@@ -185,21 +173,6 @@ export default {
// display: block;
animation: show-content-left 0.15s forwards;
}
.pen-box {
position: fixed;
right: 40rpx;
top: 5%;
width: 120rpx;
height: 120rpx;
z-index: 10;
box-shadow: 0 4px 12px 0 #00000033;
border-radius: 16rpx;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
@keyframes show-content-left {
0% {
left: 100%;
......@@ -208,7 +181,7 @@ export default {
left: 0;
}
}
.tool-box{
.tool-box {
top: 5%;
}
</style>
<template>
<view class="container">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="32"></uni-icons>
</view>
<view class="nav-title">历史成交记录</view>
</view>
<view class="box">
<view class="data-tabs-box">
<view class="data-tabs">
<template v-for="(i, index) in dateList">
<template v-for="(item, index) in dateList">
<view
:class="['tab flex', { active: dateIndex == index }]"
:class="['tab flex', { active: groupIndex == item.id }]"
:key="index"
@click="changeIndex(index)"
>{{ i.text }}</view
@click="changeIndex(item.id)"
>{{ item.text }}</view
>
</template>
<view :class="['active-btn', `active-btn-${dateIndex}`]"></view>
<view :class="['active-btn', `active-btn-${groupIndex - 1}`]"></view>
</view>
</view>
<scroll-view
......@@ -31,27 +25,45 @@
<template v-if="list.length">
<template v-for="item in list">
<view class="item" :key="item.id">
<view
:class="[
'status flex',
{ deal: item.receptionStatus == 1 },
]"
>{{
{
1: "成交",
0: "战败",
}[item.receptionStatus]
}}</view
>
<image
class="image-box"
v-if="item.payVouchers.length"
:src="item.payVouchers[0].payVoucher"
/>
<image
v-else
class="image-box"
src="../../assets/images/boutique/photos.png"
/>
<view class="name">
{{ item.customerName }}
{{ item.customerName || "-" }}
</view>
<view class="goods-name flex">
{{
item.goodsList.length ? item.goodsList[0].goodsName : "-"
}}
<image
v-if="item.goodsList.length > 1"
@click="handleLook(item.goodsList)"
class="image-look"
src="../../assets/images/boutique/look.png"
/>
</view>
<template v-for="(k, ind) in itemObject">
<view class="info flex" :key="ind">
<view class="label">{{ k.label }}</view>
<view class="value">{{ item[k.key] || "-" }}</view>
<view :class="{ value: true, bold: k.isBold }">{{
item[k.key] || "-"
}}</view>
</view>
</template>
<view class="info flex">
<view class="label">实收金额</view>
<view class="value bold"
>¥ <text>{{ item.totalPrice }}</text></view
>
</view>
</view>
</template>
</template>
......@@ -71,6 +83,27 @@
</template>
</scroll-view>
</view>
<MessageBox
ref="historyRef"
title="订单商品"
:popupW="1120"
:isFooter="false"
>
<view class="popup-body">
<table class="tabel-box" cellspacing="0" border="0" cellpadding="0">
<tr>
<th>商品名称</th>
<th>部位</th>
<th>件数</th>
</tr>
<tr v-for="i in goodsList">
<td>{{ i.goodsName }}</td>
<td>{{ i.goodsPosition }}</td>
<td>{{ i.number }}</td>
</tr>
</table>
</view>
</MessageBox>
</view>
</template>
<script type="text/ecmascript-6">
......@@ -80,16 +113,18 @@ export default {
mixins:[Record],
data() {
return {
imageUrl: require('@/assets/images/noviceGuide/step1-1.webp'),
groupIndex:1,
goodsList:[],
name: '',
dateList: [
{ text: '车窗膜' },
{ text: '其他精品' }
{ text: '车窗膜',id:1 },
{ text: '其他精品',id:2 }
],
itemObject: [
{ label: '车架号', key: 'phoneNumber' },
{ label: '工单号', key: 'salesName' },
{ label: '交易流水号', key: 'duration' },
{ label: '实收金额', key: 'startTime' }
{ label: '车架号', key: 'standNo' },
{ label: '工单号', key: 'orderCode' },
{ label: '交易流水号', key: 'outTradeNo' }
],
}
},
......@@ -106,30 +141,30 @@ export default {
this.getRecordList()
} else this.nothing = true
},
handleLook(data) {
this.$refs.historyRef.open()
this.goodsList = data
},
changeIndex(index) {
if (this.dateIndex == index) return
if (this.groupIndex == index) return
this.flag = false
this.nothing = false
this.total = 0
this.list = []
this.pageNum = 1
this.dateIndex = index
this.groupIndex = index
this.getRecordList()
},
input(e) {
console.log(e.detail.value)
},
getRecordList() {
const { pageNum, pageSize } = this,
const { pageNum, pageSize,groupIndex } = this,
userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo;
this.getList('getReceptionList',{
merchantId: shopMerchantId,
this.getList('historyDealOrderPage',{
merchantId: [shopMerchantId],
pageNum,
pageSize,
startTime: '2024-05-27 00:00:00',
endTime: '2024-06-02 23:59:59'
goodsTypeGroup:groupIndex
})
}
......@@ -254,11 +289,12 @@ export default {
.item {
background: #ffffff;
border-radius: 16rpx;
border-radius: 32rpx;
box-sizing: border-box;
padding: 24rpx 32rpx;
position: relative;
box-shadow: inset 0 0 16rpx 0 #ffffff;
z-index: 11;
.status {
position: absolute;
top: 24rpx;
......@@ -293,20 +329,92 @@ export default {
font-size: 32rpx;
color: #2c66f7;
margin-top: 16rpx;
.image-look {
width: 40rpx;
height: 40rpx;
margin-left: 10rpx;
}
}
.image-box {
width: 250rpx;
height: 100%;
position: absolute;
top: 0rpx;
opacity: 0.5;
right: 0rpx;
background-size: 100% 100%;
}
.info {
margin-top: 16rpx;
font-size: 24rpx;
color: #999ea8;
.label {
width: 160rpx;
}
.value {
margin-left: auto;
margin-left: 20rpx;
color: #666666;
&.bold {
color: #22ac38;
text {
font-size: 32rpx;
}
}
}
}
}
}
}
}
.popup-body {
.tabel-box {
margin-top: 50rpx;
width: 100%;
tr {
border-radius: 16rpx;
&:first-child {
margin-bottom: 10rpx;
}
td,
th {
color: #333333;
font-weight: 500;
height: 96rpx;
background: #edf2ff;
text-align: left;
padding-left: 30rpx;
border: 1rpx solid #fff;
&:first-child {
width: 60%;
}
&:nth-child(2) {
width: 20%;
}
&:nth-child(3) {
width: 20%;
}
}
th {
border-bottom: 20rpx solid #fff;
}
td {
height: 96rpx;
background: #f7f7f7;
}
}
}
}
.nothing {
width: 100vw;
flex-direction: column;
margin-top: 112rpx;
font-size: 28rpx;
color: #999999;
.icon {
width: 676rpx;
height: 284rpx;
margin-bottom: 24rpx;
}
}
</style>
......@@ -65,8 +65,7 @@ export default {
name: 'boutique',
data () {
return {
moduleList: [
],
moduleList: [],
moduleKey: Date.now(),
chooseItem: {},
id: '',
......@@ -74,6 +73,16 @@ export default {
customerType: 1
}
},
onBackPress (options) {
if (options.from === "backbutton") {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
this.back();
return true;
}
// 其他情况允许正常返回
return false;
},
mounted () {
this.init()
this.moduleList.map((e, index) => {
......@@ -160,16 +169,16 @@ export default {
this.init();
},
async start () {
// const result = await this.$permision.requestAndroidPermission(
// "android.permission.RECORD_AUDIO"
// );
// if (result !== 1) {
// uni.showToast({
// title: "为了记录语音通话,请打开录音权限",
// icon: "none",
// });
// return;
// }
const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO"
);
if (result !== 1) {
uni.showToast({
title: "为了记录语音通话,请打开录音权限",
icon: "none",
});
return;
}
this.$refs.customerTypeRef.open()
this.startAudio();
},
......
<template>
<view class="container">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="32"></uni-icons>
</view>
<view class="nav-title">客户邀约</view>
</view>
<view class="box">
<view class="input-box">
<input
type="text"
class="input"
:value="name"
:value="customerNameOrPhone"
placeholder="搜索客户姓名/电话"
maxlength="11"
@blur="input($event)"
......@@ -30,16 +24,8 @@
<template v-for="item in list">
<view class="item" :key="item.id">
<view
:class="[
'status flex',
{ deal: item.receptionStatus == 1 },
]"
>{{
{
1: "成交",
0: "战败",
}[item.receptionStatus]
}}</view
:class="['status flex', 'status_' + item.inviteStatus]"
>{{ inviteStatus[item.inviteStatus] }}</view
>
<view class="name">
{{ item.customerName }}
......@@ -77,7 +63,7 @@ export default {
mixins:[Record],
data () {
return {
name:'',
customerNameOrPhone:'',
list: [{
id:1,
carModel:1,
......@@ -85,12 +71,13 @@ export default {
receptionStatus:1
}],
inviteStatus:{1:'待邀约',2:'已邀约',3:'取消预约',4:'已施工',5:'超时未到店'},
itemObject: [
{ label: '客户电话', key: 'phoneNumber' },
{ label: '客户车型', key: 'salesName' },
{ label: '礼券名称', key: 'duration' },
{ label: '领券时间', key: 'startTime' },
{ label: '销售顾问', key: 'endTime' },
{ label: '客户电话', key: 'customerPhone' },
{ label: '客户车型', key: 'carBrand' },
{ label: '礼券名称', key: 'couponName' },
{ label: '领券时间', key: 'receiveCouponDate' },
{ label: '销售顾问', key: 'employeeName' },
],
}
},
......@@ -108,18 +95,19 @@ export default {
} else this.nothing = true
},
input(e) {
console.log(e.detail.value)
this.customerNameOrPhone = e.detail.value
this.pageNum = 1
this.getRecordList()
},
getRecordList() {
const { pageNum, pageSize } = this,
const { pageNum, pageSize,customerNameOrPhone } = this,
userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo;
this.getList('getReceptionList',{
merchantId: shopMerchantId,
this.getList('customerInviteRecordPage',{
merchantId: [shopMerchantId],
pageNum,
pageSize,
startTime: '2024-05-27 00:00:00',
endTime: '2024-06-02 23:59:59'
customerNameOrPhone,
})
}
......@@ -174,6 +162,7 @@ export default {
border-radius: 16rpx;
width: 100%;
line-height: 80rpx;
text-align: center;
}
}
.record-box {
......@@ -200,14 +189,28 @@ export default {
position: absolute;
top: 24rpx;
right: 32rpx;
width: 88rpx;
width: 152rpx;
height: 44rpx;
background: #fdece9;
color: #f24724;
border-radius: 4rpx;
font-weight: 500;
font-size: 24rpx;
justify-content: center;
&.status_1 {
background: #fff5e6;
color: #ff9d0a;
}
&.status_2 {
background: #eaf9f1;
color: #35c376;
}
&.status_3 {
background: #eeeeee;
color: #999999;
}
&.status_5 {
background: #fdece9;
color: #f24724;
}
}
.deal {
background: #eaf9f1;
......@@ -241,4 +244,16 @@ export default {
}
}
}
.nothing {
width: 100vw;
flex-direction: column;
margin-top: 112rpx;
font-size: 28rpx;
color: #999999;
.icon {
width: 676rpx;
height: 284rpx;
margin-bottom: 24rpx;
}
}
</style>
......@@ -99,7 +99,6 @@ export default {
data () {
return {
drawStatus: false,
finishVisible: false,
showPayBtn: false
};
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!