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