Commit ec4ca597 by 李伟康

commit 修改

1 parent a32dc8ba
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
url: "/pages/common/login", url: "/pages/common/login",
}); });
} }
// let version = '1.0.0' // let version = '1.0.1'
let version = plus.runtime.version; let version = plus.runtime.version;
uni.$api.commonApi.getAPPVersion().then((res) => { uni.$api.commonApi.getAPPVersion().then((res) => {
if (res != version) this.$store.dispatch("openUpdateModal"); if (res != version) this.$store.dispatch("openUpdateModal");
......
...@@ -79,7 +79,7 @@ class Request { ...@@ -79,7 +79,7 @@ class Request {
}, },
fail(error) { fail(error) {
uni.hideLoading(); uni.hideLoading();
console.error(`接口异常:`, error); console.error(`${params.method}接口异常:`, error);
uni.showToast({ uni.showToast({
title: title:
typeof error == "string" typeof error == "string"
......
...@@ -46,6 +46,9 @@ ...@@ -46,6 +46,9 @@
confirmBtnText confirmBtnText
}}</view> }}</view>
</view> </view>
<template v-else>
<slot name="footer"></slot>
</template>
</view> </view>
</uni-popup> </uni-popup>
</template> </template>
......
...@@ -82,7 +82,8 @@ export default { ...@@ -82,7 +82,8 @@ export default {
}, },
//保存录音记录及其他信息 //保存录音记录及其他信息
async uploadVoice(tempFilePath) { async uploadVoice(tempFilePath) {
const { shopMerchantId, phone } = uni.$storage.get("userInfo"), try {
const { shopMerchantId, phone } = uni.$storage.get("userInfo"),
{ customerName, phoneNumber, salesUuid, carModel } = { customerName, phoneNumber, salesUuid, carModel } =
this.$store.state.user.customerInfo, this.$store.state.user.customerInfo,
receptionCustomerPaySourceList = this.booksList.map((item) => { receptionCustomerPaySourceList = this.booksList.map((item) => {
...@@ -106,6 +107,7 @@ export default { ...@@ -106,6 +107,7 @@ export default {
receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径 receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径
merchantId: shopMerchantId, merchantId: shopMerchantId,
}; };
console.log(customerName , phoneNumber,salesUuid ,carModel)
if (customerName && phoneNumber && salesUuid && carModel) if (customerName && phoneNumber && salesUuid && carModel)
uni.$api.commonApi.saveRecCustomer(params).then((res) => { uni.$api.commonApi.saveRecCustomer(params).then((res) => {
console.log(res, params); console.log(res, params);
...@@ -115,6 +117,9 @@ export default { ...@@ -115,6 +117,9 @@ export default {
this.setReceptionStatus(1); this.setReceptionStatus(1);
this.setReasonType(0); this.setReasonType(0);
uni.$storage.set("storageFile", ""); uni.$storage.set("storageFile", "");
} catch (error) {
console.log(error)
}
}, },
//开始录音 //开始录音
async startAudio() { async startAudio() {
......
...@@ -6,7 +6,10 @@ ...@@ -6,7 +6,10 @@
* @LastEditTime: 2024-04-16 18:31:54 * @LastEditTime: 2024-04-16 18:31:54
--> -->
<template> <template>
<view class="container" @click="handleTouchStart()"> <view
class="container"
@click="handleTouchStart()"
>
<view :class="['home', { show: !id }]"> <view :class="['home', { show: !id }]">
<view class="left-side"> <view class="left-side">
<!-- 左侧内容 --> <!-- 左侧内容 -->
...@@ -17,11 +20,17 @@ ...@@ -17,11 +20,17 @@
<view class="user-position">延保专员</view> <view class="user-position">延保专员</view>
</view> </view>
<view class="left-footer"> <view class="left-footer">
<view class="logout" @click="$refs.kfRef.open()"> <view
class="logout"
@click="$refs.kfRef.open()"
>
<view class="icon-logout sprite-icon icon-feedback"></view> <view class="icon-logout sprite-icon icon-feedback"></view>
<view>反馈</view> <view>反馈</view>
</view> </view>
<view class="logout" @click="logout"> <view
class="logout"
@click="logout"
>
<view class="icon-logout sprite-icon icon-icon-logout"></view> <view class="icon-logout sprite-icon icon-icon-logout"></view>
<view>退出</view> <view>退出</view>
</view> </view>
...@@ -48,7 +57,11 @@ ...@@ -48,7 +57,11 @@
</view> </view>
</template> </template>
<view class="home-title">客户接待</view> <view class="home-title">客户接待</view>
<button class="start" @click="start" hover-class="hover-class"> <button
class="start"
@click="start"
hover-class="hover-class"
>
<view class="icon-start sprite-icon icon-icon-handshake"></view> <view class="icon-start sprite-icon icon-icon-handshake"></view>
<view class="start-text">开始接待</view> <view class="start-text">开始接待</view>
...@@ -109,11 +122,18 @@ ...@@ -109,11 +122,18 @@
<MessageBox <MessageBox
:popupW="704" :popupW="704"
ref="finish" ref="finish"
@cancel="$refs.finish.close()" content="当前操作视为强制退出接待,若需正常流程完成接待请点击“完成接待”"
@confirm="done" :isFooter="false"
content="是否返回首页并结束本次接待" >
confirmBtnText="确认" <view class="footer">
></MessageBox> <view class="footer-btn confirm flex" @click="$refs.finish.close()">
完成接待<text>(推荐)</text>
</view>
<view class="footer-btn cancel flex" @click="done">
仍要退出<text>(不推荐)</text>
</view>
</view>
</MessageBox>
<update-box /> <update-box />
<kf-box ref="kfRef" /> <kf-box ref="kfRef" />
<novice-guide <novice-guide
...@@ -132,7 +152,7 @@ import NoviceGuide from "@/components/NoviceGuide.vue"; ...@@ -132,7 +152,7 @@ import NoviceGuide from "@/components/NoviceGuide.vue";
export default { export default {
mixins: [myClick], mixins: [myClick],
components: { detail, KfBox, NoviceGuide }, components: { detail, KfBox, NoviceGuide },
data() { data () {
return { return {
moduleList: [], moduleList: [],
userInfo: {}, userInfo: {},
...@@ -143,7 +163,7 @@ export default { ...@@ -143,7 +163,7 @@ export default {
thumbnailFulfillList: [], thumbnailFulfillList: [],
}; };
}, },
mounted() { mounted () {
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo; { shopMerchantId } = userInfo;
this.userInfo = userInfo; this.userInfo = userInfo;
...@@ -170,7 +190,7 @@ export default { ...@@ -170,7 +190,7 @@ export default {
this.$store.dispatch("setEmployeeList", res); this.$store.dispatch("setEmployeeList", res);
}); });
}, },
onBackPress(options) { onBackPress (options) {
if (options.from === "backbutton") { if (options.from === "backbutton") {
// 物理返回按钮触发 // 物理返回按钮触发
// 阻止默认行为,即不执行页面返回 // 阻止默认行为,即不执行页面返回
...@@ -180,21 +200,21 @@ export default { ...@@ -180,21 +200,21 @@ export default {
// 其他情况允许正常返回 // 其他情况允许正常返回
return false; return false;
}, },
onShow() { onShow () {
this.getSoure(); this.getSoure();
}, },
async onReachBottom() { async onReachBottom () {
this.$refs.detail?.pageonReachBottom(); this.$refs.detail?.pageonReachBottom();
}, },
methods: { methods: {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
// 查询素材 // 查询素材
async getSoure() { async getSoure () {
const moduleList = await uni.$api.commonApi.findSoureList(); const moduleList = await uni.$api.commonApi.findSoureList();
this.moduleList = moduleList; this.moduleList = moduleList;
// this.skeletonStatus = false // this.skeletonStatus = false
}, },
async start() { async start () {
const result = await this.$permision.requestAndroidPermission( const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO" "android.permission.RECORD_AUDIO"
); );
...@@ -210,7 +230,7 @@ export default { ...@@ -210,7 +230,7 @@ export default {
this.type = "edit"; this.type = "edit";
}, },
// 退出 // 退出
logout() { logout () {
uni.$storage.rm("userInfo"); uni.$storage.rm("userInfo");
uni.$storage.rm("sessionId"); uni.$storage.rm("sessionId");
uni.$storage.rm("noSignInUuid"); uni.$storage.rm("noSignInUuid");
...@@ -219,45 +239,44 @@ export default { ...@@ -219,45 +239,44 @@ export default {
url: "/pages/common/login", url: "/pages/common/login",
}); });
}, },
toDetail(item) { toDetail (item) {
this.chooseItem = item; this.chooseItem = item;
this.$refs.previewRef.open(); this.$refs.previewRef.open();
}, },
cancel() { cancel () {
this.$refs.previewRef.close(); this.$refs.previewRef.close();
}, },
preview() { preview () {
let { id } = this.chooseItem; let { id } = this.chooseItem;
this.type = "preview"; this.type = "preview";
this.id = id; this.id = id;
this.$refs.previewRef.close(); this.$refs.previewRef.close();
}, },
// 完成接待 // 完成接待
done(e) { done (e) {
this.stopAudio(); this.stopAudio();
// uni.navigateBack(); // uni.navigateBack();
this.id = ""; this.id = "";
this.type = ""; this.type = "";
this.$store.dispatch("clearCanvas", true); this.$store.dispatch("clearCanvas", true);
this.$store.dispatch("clearCustomerInfo");
this.setReceptionStatus(e); this.setReceptionStatus(e);
}, },
back() { back () {
if (!this.id) return uni.navigateBack(); if (!this.id) return uni.navigateBack();
if (this.type != "preview") return this.$refs.finish.open(); if (this.type != "preview") return this.$refs.finish.open();
this.$store.dispatch("clearCustomerInfo"); this.$store.dispatch("clearCustomerInfo");
this.id = ""; this.id = "";
this.type = ""; this.type = "";
}, },
thumbnailLoad(id) { thumbnailLoad (id) {
this.thumbnailFulfillList.push(id); this.thumbnailFulfillList.push(id);
if (this.thumbnailFulfillList.length == this.moduleList.length) if (this.thumbnailFulfillList.length == this.moduleList.length)
this.skeletonStatus = false; this.skeletonStatus = false;
}, },
openKf() { openKf () {
this.$refs.kfRef.open(); this.$refs.kfRef.open();
}, },
nextStep() { nextStep () {
let { id } = this.moduleList[0]; let { id } = this.moduleList[0];
this.type = "preview"; this.type = "preview";
this.id = id; this.id = id;
...@@ -504,61 +523,31 @@ export default { ...@@ -504,61 +523,31 @@ export default {
} }
} }
} }
// 未开始接待弹窗 .footer {
.tips-wrapper { border-top: 2rpx solid #eff0f2;
width: 704rpx; font-weight: 600;
height: 372rpx; font-size: 32rpx;
background: #ffffff; margin-top: 48rpx;
border-radius: 20rpx; .footer-btn{
.tips-content { justify-content: center;
padding: 48rpx; margin-top: 16rpx;
border-bottom: 1px solid #e8e8e8;
.tips-title {
position: relative;
width: 100%;
font-weight: 500;
font-size: 32rpx;
color: #292d33;
text-align: center;
.icon-close {
position: absolute;
right: 0;
top: -24rpx;
width: 160rpx;
font-size: 50rpx;
text-align: right;
padding-right: 20rpx;
line-height: 96rpx;
}
}
} }
.tips-text { .confirm {
font-size: 30rpx; width: 608rpx;
color: #5a5e66; height: 80rpx;
letter-spacing: 1rpx; background: #2c66f7;
text-align: center; border-radius: 40rpx;
line-height: 40rpx; color: #fff;
margin-top: 48rpx;
} }
.tips-footer { .cancel {
display: flex; width: 608rpx;
align-items: center; height: 80rpx;
justify-content: center; background: #ffffff00;
height: 100rpx; border-radius: 40rpx;
color: #2C66F7;
.close {
color: #6c6c70;
}
.preview {
color: #2c66f7;
}
} }
.tips-btn { text {
width: 50%; font-size: 24rpx;
text-align: center;
font-size: 32rpx;
text-align: center;
line-height: 44rpx;
} }
} }
@keyframes shine { @keyframes shine {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!