Commit efedd386 by 前端

修改bug

1 parent dfe9ccd3
...@@ -15,14 +15,14 @@ export default { ...@@ -15,14 +15,14 @@ export default {
}, },
onShow: function () {}, onShow: function () {},
onHide: function () { onHide: function () {
// if (this.isStart && !this.isEnd) { if (this.isStart && !this.isEnd) {
// console.log("录音"); console.log("录音");
// const recorderManager = uni.getRecorderManager(); const recorderManager = uni.getRecorderManager();
// recorderManager.stop(); recorderManager.stop();
// recorderManager.start({ recorderManager.start({
// duration: 10000, duration: 10000,
// }); });
// } }
}, },
}; };
</script> </script>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48 * @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-10 16:15:05 * @LastEditTime: 2024-04-10 20:36:46
* @FilePath: \gl_tape\mixin\click.js * @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -12,11 +12,10 @@ import { mapMutations, mapState } from "vuex"; ...@@ -12,11 +12,10 @@ import { mapMutations, mapState } from "vuex";
export default { export default {
data() { data() {
return { return {
endReasonType: 0,
voicePath: "", voicePath: "",
timer: null, timer: null,
times: 0, times: 0,
timeout: 600, //十分钟提示 timeout: 590, //十分钟提示
reaction: 10, reaction: 10,
}; };
}, },
...@@ -28,6 +27,7 @@ export default { ...@@ -28,6 +27,7 @@ export default {
...mapState("audio", [ ...mapState("audio", [
"isEnd", "isEnd",
"receptionStatus", "receptionStatus",
"endReasonType",
"booksList", "booksList",
"audioList", "audioList",
"isStart", "isStart",
...@@ -52,6 +52,7 @@ export default { ...@@ -52,6 +52,7 @@ export default {
methods: { methods: {
...mapMutations("audio", [ ...mapMutations("audio", [
"setReceptionStatus", "setReceptionStatus",
"setReasonType",
"setAudioStart", "setAudioStart",
"setAudioList", "setAudioList",
"setAudioEnd", "setAudioEnd",
...@@ -59,8 +60,13 @@ export default { ...@@ -59,8 +60,13 @@ export default {
]), ]),
//关闭提示 //关闭提示
tipCancel() { tipCancel() {
this.times = 0; this.stopAudio();
this.setReceptionStatus(0);
this.setReasonType(1);
this.$refs.tipBox.close(); this.$refs.tipBox.close();
uni.reLaunch({
url: "/pages/home/home",
});
}, },
//结束提示 //结束提示
tipConfirm() { tipConfirm() {
...@@ -74,7 +80,7 @@ export default { ...@@ -74,7 +80,7 @@ export default {
}, },
//保存录音记录及其他信息 //保存录音记录及其他信息
async uploadVoice(tempFilePath) { async uploadVoice(tempFilePath) {
const { merchantId, phone } = uni.$storage.get("userInfo"), 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) => {
...@@ -86,7 +92,7 @@ export default { ...@@ -86,7 +92,7 @@ export default {
}), }),
params = { params = {
carModel, carModel,
endReasonType: this.endReasonType, endReasonType: this.endReasonType, //原因 1.异常 0.正常
customerName, customerName,
phoneNumber, phoneNumber,
loginPhone: phone, loginPhone: phone,
...@@ -96,7 +102,7 @@ export default { ...@@ -96,7 +102,7 @@ export default {
receptionStartTime: this.receptionStartTime, receptionStartTime: this.receptionStartTime,
receptionEndTime: this.receptionEndTime, receptionEndTime: this.receptionEndTime,
receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径 receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径
merchantId, merchantId: shopMerchantId,
}; };
this.setBooks([]); this.setBooks([]);
console.log(params); console.log(params);
...@@ -105,8 +111,8 @@ export default { ...@@ -105,8 +111,8 @@ export default {
console.log(res); console.log(res);
}); });
this.$store.dispatch("clearCustomerInfo"); this.$store.dispatch("clearCustomerInfo");
this.endReasonType = 0;
this.setReceptionStatus(1); this.setReceptionStatus(1);
this.setReasonType(0);
uni.$storage.set("storageFile", ""); uni.$storage.set("storageFile", "");
}, },
//开始录音 //开始录音
...@@ -116,7 +122,7 @@ export default { ...@@ -116,7 +122,7 @@ export default {
this.setAudioList([]); this.setAudioList([]);
this.setAudioEnd(false); this.setAudioEnd(false);
recorderManager.start({ recorderManager.start({
duration: 10000, duration: 600000,
}); });
recorderManager.onStop(async (res) => { recorderManager.onStop(async (res) => {
if (!this.isEnd) { if (!this.isEnd) {
...@@ -147,9 +153,8 @@ export default { ...@@ -147,9 +153,8 @@ export default {
} }
if (this.times >= this.reaction + this.timeout) { if (this.times >= this.reaction + this.timeout) {
//结束接待 //结束接待
this.stopAudio(); this.tipCancel();
this.endReasonType = 1; clearInterval(this.timer);
this.$refs.tipBox.close();
} }
}, 1000); }, 1000);
}, },
......
...@@ -7,10 +7,7 @@ ...@@ -7,10 +7,7 @@
<view class="title">问界·交车告知书</view> <view class="title">问界·交车告知书</view>
<view class="form"> <view class="form">
<template v-for="(i, index) in formObject"> <template v-for="(i, index) in formObject">
<view <view class="form-item" :key="index">
class="form-item"
:key="index"
>
<view class="label">{{ i.label }}</view> <view class="label">{{ i.label }}</view>
<view class="value"> <view class="value">
<template v-if="i.type == 'input'"> <template v-if="i.type == 'input'">
...@@ -23,16 +20,9 @@ ...@@ -23,16 +20,9 @@
/> />
</template> </template>
<template v-else> <template v-else>
<view <view class="select" @click="showPopup(i.popKey)">
class="select" {{ customerInfo[i.key] }}
@click="showPopup(i.popKey)" <uni-icons class="arrow" type="down" :size="16"></uni-icons>
>
{{customerInfo[i.key]}}
<uni-icons
class="arrow"
type="down"
:size="16"
></uni-icons>
</view> </view>
</template> </template>
</view> </view>
...@@ -40,10 +30,7 @@ ...@@ -40,10 +30,7 @@
</template> </template>
</view> </view>
<template v-for="(i, index) in views"> <template v-for="(i, index) in views">
<view <view class="view" :key="index">
class="view"
:key="index"
>
<wnCanvas <wnCanvas
saveImageType="3" saveImageType="3"
:drawImage="i.detailUrl" :drawImage="i.detailUrl"
...@@ -63,7 +50,7 @@ ...@@ -63,7 +50,7 @@
<view class="select-box"> <view class="select-box">
<view <view
class="select-item" class="select-item"
:class="{ checked:carBrand == item.name }" :class="{ checked: carBrand == item.name }"
@click="selectCar(item)" @click="selectCar(item)"
v-for="(item, index) in carBrandList" v-for="(item, index) in carBrandList"
:key="index" :key="index"
...@@ -83,7 +70,7 @@ ...@@ -83,7 +70,7 @@
<view <view
class="select-item" class="select-item"
:class="{ checked: customerInfo.carModel == item.name }" :class="{ checked: customerInfo.carModel == item.name }"
@click="handleSelect(item,'carBoxVisible')" @click="handleSelect(item, 'carBoxVisible')"
v-for="(item, index) in carlist" v-for="(item, index) in carlist"
:key="index" :key="index"
> >
...@@ -102,7 +89,7 @@ ...@@ -102,7 +89,7 @@
<view <view
class="select-item" class="select-item"
:class="{ checked: customerInfo.salesUuid == item.uuid }" :class="{ checked: customerInfo.salesUuid == item.uuid }"
@click="handleSelect(item,'employeeBoxVisible')" @click="handleSelect(item, 'employeeBoxVisible')"
v-for="(item, index) in employeeList" v-for="(item, index) in employeeList"
:key="index" :key="index"
> >
...@@ -220,7 +207,7 @@ export default { ...@@ -220,7 +207,7 @@ export default {
top: 0; top: 0;
width: 100%; width: 100%;
height: 432rpx; height: 432rpx;
image{ image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
......
...@@ -9,53 +9,56 @@ ...@@ -9,53 +9,56 @@
<Tabs :list="list" @tabclick="tabclick" /> <Tabs :list="list" @tabclick="tabclick" />
</template> </template>
<view class="card-list"> <view class="card-list">
<template v-if="historyList.length > 0"> <template v-if="historyList.length > 0">
<view class="card-item" v-for="item in historyList" :key="item.id"> <view class="card-item" v-for="item in historyList" :key="item.id">
<view class="name">{{ nameHide(item.customerName) }}</view> <view class="name">{{ nameHide(item.customerName) }}</view>
<view class="goods-name">{{ item.goodsName }}</view> <view class="goods-name">{{ item.goodsName }}</view>
<view class="card-info" <view class="card-info"
><view>车架号</view><view>{{ item.carVin || 4654651 }}</view></view ><view>车架号</view
> ><view>{{ item.carVin || 4654651 }}</view></view
<view class="card-info" >
><view>工单号</view><view>{{ item.payId }}</view></view <view class="card-info"
> ><view>工单号</view><view>{{ item.payId }}</view></view
<view class="card-info" >
><view>订单时间</view> <view class="card-info"
<view>{{ format(item.createdTime) }}</view> ><view>订单时间</view>
</view <view>{{ format(item.createdTime) }}</view>
> </view>
<view class="card-info" <view class="card-info"
><view>交易流水号</view><view>{{ item.transactionNo }}</view></view ><view>交易流水号</view
> ><view>{{ item.transactionNo }}</view></view
<view class="card-info" >
><view>支付方式</view <view class="card-info"
><glsx-image ><view>支付方式</view
class="pay-type" ><glsx-image
:src="`media/${payType[item.payType]}.png`" class="pay-type"
/></view> :src="`media/${payType[item.payType]}.png`"
<view class="card-info" /></view>
><view>实收金额</view <view class="card-info"
><view class="price">¥{{ item.equityPrice }}</view></view ><view>实收金额</view
> ><view class="price">¥{{ accDiv(item.equityPrice) }}</view></view
</view> >
</template> </view>
<template v-else> </template>
<view class="no-data"> <template v-else>
<glsx-image <view class="no-data">
class="no-data-img" <glsx-image
src="media/no-data.png" class="no-data-img"
mode="scaleToFill" src="media/no-data.png"
/> mode="scaleToFill"
<view class="no-data-text">暂无数据</view> />
</view> <view class="no-data-text">暂无数据</view>
</template> </view>
</template>
<!-- <uni-grid :column="3" :show-border="false" :square="false"> <!-- <uni-grid :column="3" :show-border="false" :square="false">
<uni-grid-item v-for="item in historyList" :key="item.id"> --> <uni-grid-item v-for="item in historyList" :key="item.id"> -->
<!-- </uni-grid-item> <!-- </uni-grid-item>
</uni-grid> --> </uni-grid> -->
</view> </view>
<view class="end-text" v-if="historyList.length > 0 && isEnd">我是一个有底线的人</view> <view class="end-text" v-if="historyList.length > 0 && isEnd"
>我是一个有底线的人</view
>
</view> </view>
</view> </view>
</template> </template>
...@@ -113,6 +116,9 @@ export default { ...@@ -113,6 +116,9 @@ export default {
format(dateTimeStr) { format(dateTimeStr) {
return utils.convertDateTimeFormat(dateTimeStr, '/') return utils.convertDateTimeFormat(dateTimeStr, '/')
}, },
accDiv(val) {
return utils.accDiv(val, 100)
},
init(){ init(){
const { shopMerchantId } = uni.$storage.get("userInfo"); const { shopMerchantId } = uni.$storage.get("userInfo");
this.shopMerchantId = shopMerchantId this.shopMerchantId = shopMerchantId
...@@ -139,7 +145,7 @@ export default { ...@@ -139,7 +145,7 @@ export default {
if (this.historyList.length > 9) this.isEnd = true if (this.historyList.length > 9) this.isEnd = true
} }
} }
}, },
tabclick(index) { tabclick(index) {
this.goodsName = this.list[index].value this.goodsName = this.list[index].value
...@@ -174,7 +180,7 @@ export default { ...@@ -174,7 +180,7 @@ export default {
top: 0; top: 0;
width: 100%; width: 100%;
height: 176rpx; height: 176rpx;
image{ image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
...@@ -254,7 +260,7 @@ export default { ...@@ -254,7 +260,7 @@ export default {
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
&-img { &-img {
width: 640rpx; width: 640rpx;
height: 272rpx; height: 272rpx;
} }
&-text { &-text {
font-size: 32rpx; font-size: 32rpx;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<uni-icons type="left" :size="32"></uni-icons> <uni-icons type="left" :size="32"></uni-icons>
</view> </view>
</view> </view>
<view :class="['view', { showView: id == 1 }]"> <view :class="['view', { showView: id == 1 }]">
<media_1 :views="media[1]" :penSwitch="type != 'preview' && drawStatus" /> <media_1 :views="media[1]" :penSwitch="type != 'preview' && drawStatus" />
</view> </view>
...@@ -35,9 +35,7 @@ ...@@ -35,9 +35,7 @@
<template v-if="type != 'preview'"> <template v-if="type != 'preview'">
<tool-box :type="type" @choose="choose" @finish="open" /> <tool-box :type="type" @choose="choose" @finish="open" />
<view class="pen-box" @click="drawStatus = !drawStatus"> <view class="pen-box" @click="drawStatus = !drawStatus">
<image <image :src="!drawStatus ? defaulePen : activePen" />
:src="!drawStatus ? defaulePen : activePen"
/>
</view> </view>
</template> </template>
<MessageBox <MessageBox
...@@ -103,8 +101,8 @@ export default { ...@@ -103,8 +101,8 @@ export default {
}, },
drawStatus: false, drawStatus: false,
finishVisible: false, finishVisible: false,
defaulePen: require('../../assets/images/media/pen.png'), defaulePen: require("../../assets/images/media/pen.png"),
activePen: require('../../assets/images/media/pen-active.png'), activePen: require("../../assets/images/media/pen-active.png"),
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -114,10 +112,10 @@ export default { ...@@ -114,10 +112,10 @@ export default {
this.getFindSoureDetail(options.id); this.getFindSoureDetail(options.id);
}, },
onBackPress(options) { onBackPress(options) {
if (options.from === 'backbutton') { if (options.from === "backbutton") {
// 物理返回按钮触发 // 物理返回按钮触发
// 阻止默认行为,即不执行页面返回 // 阻止默认行为,即不执行页面返回
if (this.type != "preview") this.$refs.finish.open() if (this.type != "preview") this.$refs.finish.open();
return true; return true;
} }
// 其他情况允许正常返回 // 其他情况允许正常返回
...@@ -148,7 +146,6 @@ export default { ...@@ -148,7 +146,6 @@ export default {
}, },
// 完成接待 // 完成接待
done() { done() {
this.$store.dispatch("clearCustomerInfo");
this.stopAudio(); this.stopAudio();
uni.navigateBack(); uni.navigateBack();
this.setReceptionStatus(0); this.setReceptionStatus(0);
...@@ -196,7 +193,7 @@ export default { ...@@ -196,7 +193,7 @@ export default {
.showView { .showView {
z-index: 1; z-index: 1;
display: block; display: block;
animation: show-view-left 0.15s ; animation: show-view-left 0.15s;
} }
.pen-box { .pen-box {
position: fixed; position: fixed;
...@@ -208,17 +205,17 @@ export default { ...@@ -208,17 +205,17 @@ export default {
box-shadow: 0 4px 12px 0 #00000033; box-shadow: 0 4px 12px 0 #00000033;
border-radius: 16rpx; border-radius: 16rpx;
overflow: hidden; overflow: hidden;
image{ image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
@keyframes show-view-left { @keyframes show-view-left {
0%{ 0% {
transform: translateX(1000%); transform: translateX(1000%);
box-shadow: 0 8rpx 22rpx 0 #00000029; box-shadow: 0 8rpx 22rpx 0 #00000029;
} }
100%{ 100% {
transform: translateX(0); transform: translateX(0);
box-shadow: 0 8rpx 22rpx 0 #00000029; box-shadow: 0 8rpx 22rpx 0 #00000029;
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: 首页 * @Description: 首页
* @Author: huyue * @Author: huyue
* @Date: 2024-04-07 14:39:40 * @Date: 2024-04-07 14:39:40
* @LastEditors: huyue * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-10 17:00:04 * @LastEditTime: 2024-04-10 19:56:12
--> -->
<template> <template>
<view class="container" @click="handleTouchStart()"> <view class="container" @click="handleTouchStart()">
...@@ -102,6 +102,8 @@ export default { ...@@ -102,6 +102,8 @@ export default {
}, },
mounted() { mounted() {
this.userInfo = uni.$storage.get("userInfo"); this.userInfo = uni.$storage.get("userInfo");
},
onShow() {
this.getSoure(); this.getSoure();
}, },
methods: { methods: {
...@@ -142,7 +144,7 @@ export default { ...@@ -142,7 +144,7 @@ export default {
uni.navigateTo({ uni.navigateTo({
url: `../detail/detail?type=preview&id=${id}`, url: `../detail/detail?type=preview&id=${id}`,
}); });
this.$refs.previewRef.close() this.$refs.previewRef.close();
}, },
}, },
}; };
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<view class="select-box"> <view class="select-box">
<view <view
class="select-item" class="select-item"
:class="{ checked:carBrand == item.name }" :class="{ checked: carBrand == item.name }"
@click="selectCar(item)" @click="selectCar(item)"
v-for="(item, index) in carBrandList" v-for="(item, index) in carBrandList"
:key="index" :key="index"
...@@ -156,7 +156,11 @@ ...@@ -156,7 +156,11 @@
</view> </view>
</MessageBox> </MessageBox>
<uni-popup ref="successRef" type="message"> <uni-popup ref="successRef" type="message">
<uni-popup-message type="success" message="保存成功" :duration="1500"></uni-popup-message> <uni-popup-message
type="success"
message="保存成功"
:duration="1500"
></uni-popup-message>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
...@@ -226,9 +230,9 @@ export default { ...@@ -226,9 +230,9 @@ export default {
employeeList: [], employeeList: [],
f_key: Date.now(), f_key: Date.now(),
errorTip: false, errorTip: false,
carBrand: '', carBrand: "",
carBrandList: [], carBrandList: [],
isPreview: false isPreview: false,
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -244,12 +248,12 @@ export default { ...@@ -244,12 +248,12 @@ export default {
}, },
onShow() { onShow() {
if (!this.isPreview) { if (!this.isPreview) {
this.infoList = this.infoList.map(item => { this.infoList = this.infoList.map((item) => {
if (item.imgUrl) { if (item.imgUrl) {
delete item.imgUrl delete item.imgUrl;
} }
return item return item;
}) });
} }
}, },
methods: { methods: {
...@@ -285,17 +289,19 @@ export default { ...@@ -285,17 +289,19 @@ export default {
this.infoList = INFO_LIST.map((item) => delete item.imgUrl); this.infoList = INFO_LIST.map((item) => delete item.imgUrl);
} else { } else {
let userInfo = uni.$storage.get("userInfo"); let userInfo = uni.$storage.get("userInfo");
uni.$api.commonApi.getMerchantCarBrandList([userInfo.shopMerchantId]).then(({ data }) => { uni.$api.commonApi
let list = data[0].carBrandList, .getMerchantCarBrandList([userInfo.shopMerchantId])
carBrandList = [] .then(({ data }) => {
list.map(e => { let list = data[0].carBrandList,
e.childs.map(i => { carBrandList = [];
i.brandId = e.id list.map((e) => {
carBrandList.push(i) e.childs.map((i) => {
}) i.brandId = e.id;
}) carBrandList.push(i);
this.carBrandList = carBrandList });
}) });
this.carBrandList = carBrandList;
});
uni.$api.commonApi uni.$api.commonApi
.getEmployeeList({ .getEmployeeList({
merchantId: userInfo.shopMerchantId, merchantId: userInfo.shopMerchantId,
...@@ -318,12 +324,12 @@ export default { ...@@ -318,12 +324,12 @@ export default {
this.setBooks(utils.deepClone(this.infoList)); this.setBooks(utils.deepClone(this.infoList));
this.stopAudio(); this.stopAudio();
this.infoList = INFO_LIST.map((item) => delete item.imgUrl); this.infoList = INFO_LIST.map((item) => delete item.imgUrl);
this.$refs.successRef.open() this.$refs.successRef.open();
setTimeout(() => { setTimeout(() => {
uni.reLaunch({ uni.reLaunch({
url: "/pages/home/home", url: "/pages/home/home",
}); });
}, 1500) }, 1500);
} }
} catch (error) { } catch (error) {
console.log(error); console.log(error);
...@@ -345,13 +351,19 @@ export default { ...@@ -345,13 +351,19 @@ export default {
urls: [this.infoList[index].imgUrl], urls: [this.infoList[index].imgUrl],
longPressActions: { longPressActions: {
// itemList: ['发送给朋友', '保存图片', '收藏'], // itemList: ['发送给朋友', '保存图片', '收藏'],
success: function(data) { success: function (data) {
console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); console.log(
"选中了第" +
(data.tapIndex + 1) +
"个按钮,第" +
(data.index + 1) +
"张图片"
);
}, },
fail: function(err) { fail: function (err) {
console.log(err.errMsg); console.log(err.errMsg);
} },
} },
}); });
// this.$refs.preview.open("center"); // this.$refs.preview.open("center");
}, },
...@@ -362,7 +374,7 @@ export default { ...@@ -362,7 +374,7 @@ export default {
this.formData.salesUuid = item.uuid; this.formData.salesUuid = item.uuid;
this.formData.staffName = item.staffName; this.formData.staffName = item.staffName;
} else { } else {
this.$refs.carBrandListVisible.close() this.$refs.carBrandListVisible.close();
this.formData.carModel = item.name; this.formData.carModel = item.name;
} }
this.$store.dispatch("setCustomerInfo", this.formData); this.$store.dispatch("setCustomerInfo", this.formData);
...@@ -380,17 +392,20 @@ export default { ...@@ -380,17 +392,20 @@ export default {
this.f_key = Date.now(); this.f_key = Date.now();
this.errorTip = false; this.errorTip = false;
}, },
selectCar (e) { selectCar(e) {
uni.showLoading() uni.showLoading();
this.carBrand = e.name this.carBrand = e.name;
uni.$api.commonApi.getCarBrandsList({ uni.$api.commonApi
brandId: e.brandId, .getCarBrandsList({
childBrandId: e.id brandId: e.brandId,
}).then(res => { childBrandId: e.id,
uni.hideLoading() })
this.carlist = res .then((res) => {
this.$refs.carBoxVisible.open() uni.hideLoading();
}).catch(() => uni.hideLoading()) this.carlist = res;
this.$refs.carBoxVisible.open();
})
.catch(() => uni.hideLoading());
}, },
}, },
}; };
......
...@@ -15,6 +15,7 @@ export default { ...@@ -15,6 +15,7 @@ export default {
audioList: [], audioList: [],
isStart: false, isStart: false,
receptionStatus: 1, receptionStatus: 1,
endReasonType: 0,
isEnd: false, isEnd: false,
receptionStartTime: "", receptionStartTime: "",
receptionEndTime: "", receptionEndTime: "",
...@@ -24,6 +25,9 @@ export default { ...@@ -24,6 +25,9 @@ export default {
setReceptionStatus(state, data) { setReceptionStatus(state, data) {
state.receptionStatus = data; state.receptionStatus = data;
}, },
setReasonType(state, data) {
state.endReasonType = data;
},
setAudioList(state, data) { setAudioList(state, data) {
state.audioList = data; state.audioList = data;
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 17:16:46 * @Date: 2024-04-08 17:16:46
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-10 10:08:58 * @LastEditTime: 2024-04-10 20:34:11
* @FilePath: \gl_tape\utils\utils.js * @FilePath: \gl_tape\utils\utils.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -35,7 +35,24 @@ function deepClone(value) { ...@@ -35,7 +35,24 @@ function deepClone(value) {
} }
return result; return result;
} }
//精确除法
function accDiv(arg1, arg2) {
var t1 = 0,
t2 = 0,
r1,
r2;
try {
t1 = arg1.toString().split(".")[1].length;
} catch (e) {}
try {
t2 = arg2.toString().split(".")[1].length;
} catch (e) {}
r1 = Number(arg1.toString().replace(".", ""));
r2 = Number(arg2.toString().replace(".", ""));
return (r1 / r2) * Math.pow(10, t2 - t1);
}
export default { export default {
convertDateTimeFormat, convertDateTimeFormat,
deepClone, deepClone,
accDiv,
}; };
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!