Commit 6a424875 by 前端

理由

1 parent 7a965554
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-10 09:34:49
* @LastEditTime: 2024-04-10 10:02:56
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -12,6 +12,7 @@ import { mapMutations, mapState } from "vuex";
export default {
data() {
return {
endReasonType: 0,
voicePath: "",
timer: null,
times: 0,
......@@ -26,6 +27,7 @@ export default {
computed: {
...mapState("audio", [
"isEnd",
"receptionStatus",
"booksList",
"audioList",
"isStart",
......@@ -36,6 +38,7 @@ export default {
},
methods: {
...mapMutations("audio", [
"setReceptionStatus",
"setAudioStart",
"setAudioList",
"setAudioEnd",
......@@ -70,23 +73,26 @@ export default {
}),
params = {
carModel,
endReasonType: "",
endReasonType: this.endReasonType,
customerName,
phoneNumber,
loginPhone: phone,
salesUuid,
receptionStatus: 1, //接待结果 1.成交 0.战败
receptionStatus: this.receptionStatus, //接待结果 1.成交 0.战败
recordUrlList: tempFilePath,
receptionStartTime: this.receptionStartTime,
receptionEndTime: this.receptionEndTime,
receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径
merchantId,
};
console.log(params, "params");
this.setBooks([]);
console.log(params);
uni.$api.commonApi.saveRecCustomer(params).then((res) => {
console.log(res);
});
this.$store.dispatch("clearCustomerInfo");
this.endReasonType = 0;
this.setReceptionStatus(1);
uni.$storage.set("storageFile", "");
},
//开始录音
......@@ -119,6 +125,7 @@ export default {
},
//监听点击事件
initTime() {
if (!this.isStart) return;
this.timer = setInterval(() => {
this.times++;
if (this.times >= this.timeout) {
......@@ -127,6 +134,7 @@ export default {
if (this.times >= this.reaction + this.timeout) {
//结束接待
this.stopAudio();
this.endReasonType = 1;
this.$refs.tipBox.close();
}
}, 1000);
......
......@@ -2,8 +2,8 @@
* @Description:
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: huyue
* @LastEditTime: 2024-04-10 09:41:08
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-10 10:01:46
-->
<template>
<view class="detail-box" @click="handleTouchStart()">
......@@ -76,6 +76,7 @@ import Media_3 from "./components/Media_3.vue";
import Media_4 from "./components/Media_4.vue";
import Media_5 from "./components/Media_5.vue";
import Media_6 from "./components/Media_6.vue";
import { mapMutations } from "vuex";
export default {
components: {
ToolBox,
......@@ -113,6 +114,7 @@ export default {
this.$refs.history.getQuotationList();
},
methods: {
...mapMutations("audio", ["setReceptionStatus"]),
open() {
this.$refs.payRef.open();
},
......@@ -138,13 +140,14 @@ export default {
this.$store.dispatch("clearCustomerInfo");
this.stopAudio();
uni.navigateBack();
this.setReceptionStatus(0);
},
// 选择付款方式
toPay() {
this.$refs.pay.show();
},
back() {
if (this.type != "preview") return this.$refs.finish.open()
if (this.type != "preview") return this.$refs.finish.open();
this.$store.dispatch("clearCustomerInfo");
uni.navigateBack();
},
......
......@@ -2,8 +2,8 @@
* @Description:
* @Author: huyue
* @Date: 2024-04-07 14:54:28
* @LastEditors: huyue
* @LastEditTime: 2024-04-10 10:02:02
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-10 10:22:55
-->
<template>
<view class="information-entry">
......@@ -105,7 +105,7 @@
<view
class="select-item"
:class="{ checked: formData.carModel == item.name }"
@click="handleSelect(item,'carBoxVisible')"
@click="handleSelect(item, 'carBoxVisible')"
v-for="(item, index) in carlist"
:key="index"
>
......@@ -124,7 +124,7 @@
<view
class="select-item"
:class="{ checked: formData.salesUuid == item.uuid }"
@click="handleSelect(item,'employeeBoxVisible')"
@click="handleSelect(item, 'employeeBoxVisible')"
v-for="(item, index) in employeeList"
:key="index"
>
......@@ -136,6 +136,7 @@
</template>
<script>
import upload from "@/utils/ossUploadFile/uploadFile.js";
import utils from "@/utils/utils";
const INFO_LIST = [
{
id: 1,
......@@ -243,6 +244,10 @@ export default {
done() {
if (this.isPass) {
this.stopAudio();
uni.reLaunch({
url: "/pages/home/home",
});
this.infoList = INFO_LIST.map((item) => delete item.imgUrl);
} else {
let userInfo = uni.$storage.get("userInfo");
uni.$api.commonApi
......@@ -271,14 +276,13 @@ export default {
if (!this.formData[i] && i != "salesUuid") throw i;
}
if (Object.values(this.formData).every((value) => !!value)) {
this.$refs.formRef.close()
this.setBooks(this.infoList);
this.$refs.formRef.close();
this.setBooks(utils.deepClone(this.infoList));
this.stopAudio();
uni.reLaunch({
url: "/pages/home/home",
});
this.$store.dispatch("clearCustomerInfo");
this.infoList = INFO_LIST.map(item => delete item.imgUrl)
this.infoList = INFO_LIST.map((item) => delete item.imgUrl);
}
} catch (error) {
console.log(error);
......@@ -290,7 +294,7 @@ export default {
},
// 取消
cancel() {
this.$refs.formRef.close()
this.$refs.formRef.close();
},
// 预览图片
preview(index) {
......@@ -299,7 +303,7 @@ export default {
},
handleSelect(item, popkey) {
console.log(item);
this.$refs[popkey].close()
this.$refs[popkey].close();
if (popkey == "employeeBoxVisible") {
this.formData.salesUuid = item.uuid;
this.formData.staffName = item.staffName;
......@@ -311,7 +315,7 @@ export default {
this.errorTip = false;
},
showPopup(e) {
this.$refs[e].open()
this.$refs[e].open();
},
blur(popkey) {
console.log(popkey);
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-07 18:15:11
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 11:31:38
* @LastEditTime: 2024-04-10 10:02:00
*/
// import { setToken, getToken, removeToken } from '@/utils/token';;
import utils from "@/utils/utils";
......@@ -14,12 +14,16 @@ export default {
booksList: [],
audioList: [],
isStart: false,
receptionStatus: 1,
isEnd: false,
receptionStartTime: "",
receptionEndTime: "",
};
},
mutations: {
setReceptionStatus(state, data) {
state.receptionStatus = data;
},
setAudioList(state, data) {
state.audioList = data;
},
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 17:16:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-08 18:10:47
* @LastEditTime: 2024-04-10 10:08:58
* @FilePath: \gl_tape\utils\utils.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -17,6 +17,25 @@ function convertDateTimeFormat(dateTimeStr, separator = "-") {
return `${year}${separator}${month}${separator}${day} ${hours}:${minutes}:${seconds}`;
}
function deepClone(value) {
// 排除原始类型的情况,函数时也满足此条件
if (typeof value !== "object" || value === null) {
return value;
}
// 克隆结果:1.数组 2.普通对象
const result = Array.isArray(value) ? [] : {};
// 设置克隆结果的原型链为 value 的原型链(即保持原型一致)
Object.setPrototypeOf(result, Object.getPrototypeOf(value));
// 浅层克隆
for (const key in value) {
// 排除原型上的属性
if (value.hasOwnProperty(key)) {
result[key] = deepClone(value[key]); // 针对这个对象的每一个属性值进行克隆,则达到深度克隆效果
}
}
return result;
}
export default {
convertDateTimeFormat,
deepClone,
};
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!