Commit 4e311bde by 胡悦

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

2 parents b198a6cc d9827db2
......@@ -803,7 +803,6 @@ export default {
} else {
this.isLandScape = false
}
// console.log(this.isLandScape);
let imageInfoObj = (await uni.getImageInfo({
src: this.drawImage
}))[1] || {};
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 19:42:21
* @LastEditTime: 2024-04-09 20:49:12
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -12,7 +12,6 @@ import { mapMutations, mapState } from "vuex";
export default {
data() {
return {
receptionCustomerPaySourceList: [],
tipVisible: false,
voicePath: "",
timer: null,
......@@ -28,6 +27,7 @@ export default {
computed: {
...mapState("audio", [
"isEnd",
"booksList",
"audioList",
"isStart",
"receptionEndTime",
......@@ -36,7 +36,12 @@ export default {
...mapState(["user.customerInfo"]),
},
methods: {
...mapMutations("audio", ["setAudioStart", "setAudioList", "setAudioEnd"]),
...mapMutations("audio", [
"setAudioStart",
"setAudioList",
"setAudioEnd",
"setBooks",
]),
//关闭提示
tipCancel() {
this.times = 0;
......@@ -57,14 +62,13 @@ export default {
const { merchantId, phone } = uni.$storage.get("userInfo"),
{ customerName, phoneNumber, salesUuid, carModel } =
this.$store.state.user.customerInfo,
receptionCustomerPaySourceList =
this.receptionCustomerPaySourceList.map((item) => {
return {
id: item.id,
sourceType: item.id,
sourceUrl: item.imgUrl,
};
}),
receptionCustomerPaySourceList = this.booksList.map((item) => {
return {
id: item.id,
sourceType: item.id,
sourceUrl: item.imgUrl,
};
}),
params = {
carModel,
endReasonType: "",
......@@ -80,6 +84,7 @@ export default {
merchantId,
};
console.log(params, "params");
this.setBooks([]);
uni.$api.commonApi.saveRecCustomer(params).then((res) => {
console.log(res);
});
......@@ -108,8 +113,7 @@ export default {
});
},
//结束录音
stopAudio(receptionCustomerPaySourceList) {
if (receptionCustomerPaySourceList) this.receptionCustomerPaySourceList;
stopAudio() {
this.setAudioStart(false);
this.setAudioEnd(true);
recorderManager.stop();
......
......@@ -28,31 +28,31 @@
/>
<view :class="['view', { showView: id == 1 }]">
<media_1
:views="media[id]"
:views="media[1]"
:penSwitch="type != 'preview' && drawStatus"
/>
</view>
<view :class="['view', { showView: id == 2 }]">
<media_2
:views="media[id]"
:views="media[2]"
:penSwitch="type != 'preview' && drawStatus"
/>
</view>
<view :class="['view', { showView: id == 3 }]">
<view :class="['view', { showView: id == 3 }]" >
<media_3
:views="media[id]"
:views="media[3]"
:penSwitch="type != 'preview' && drawStatus"
/>
</view>
<view :class="['view', { showView: id == 4 }]">
<view :class="['view', { showView: id == 4 }]" >
<media_4
:views="media[id]"
:views="media[4]"
:penSwitch="type != 'preview' && drawStatus"
/>
</view>
<view :class="['view', { showView: id == 5 }]">
<view :class="['view', { showView: id == 5 }]" >
<media_5
:views="media[id]"
:views="media[5]"
:penSwitch="type != 'preview' && drawStatus"
/>
</view>
......@@ -110,13 +110,13 @@ export default {
data () {
return {
type: "preview",
id: "",
id: '',
media: {
1: [],
2: [],
3: [],
4: [],
5: []
1:[],
2:[],
3:[],
4:[],
5:[],
},
drawStatus: false,
messageBoxVisible: false,
......@@ -144,9 +144,7 @@ export default {
},
async getFindSoureDetail (id) {
try {
if (this.media[id]?.length) return
this.media[id] = (await uni.$api.commonApi.getFindSoureDetail({ id })) || [];
console.log(this.media[id])
if (!this.media[id].length) this.media[id] = (await uni.$api.commonApi.getFindSoureDetail({ id })) || [];
} catch (error) {
console.log(error)
}
......@@ -190,6 +188,8 @@ export default {
}
.view {
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0;
left: 0;
......@@ -199,8 +199,6 @@ export default {
.showView {
z-index: 2;
opacity: 1;
width: 100%;
height: 100%;
display: block;
}
.pen-box {
......
......@@ -2,8 +2,8 @@
* @Description:
* @Author: huyue
* @Date: 2024-04-07 14:54:28
* @LastEditors: huyue
* @LastEditTime: 2024-04-09 20:30:13
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 20:46:24
-->
<template>
<view class="information-entry">
......@@ -54,7 +54,9 @@
:isAutoClose="false"
>
<view name="content">
<view class="error-tip" v-if="errorTip">以下信息不能为空,请完善信息后保存</view>
<view class="error-tip" v-if="errorTip"
>以下信息不能为空,请完善信息后保存</view
>
<view class="pop-tips" v-else
>检测到“交车通知书”中未填写客户档案,请填写后再完成接待。</view
>
......@@ -62,7 +64,7 @@
<template v-for="(i, index) in formObject">
<view class="form-item" :key="index">
<view class="label">{{ i.label }}</view>
<view :class="['value', {error: i.error}]">
<view :class="['value', { error: i.error }]">
<template v-if="i.type == 'input'">
<input
:type="i.inputType"
......@@ -153,6 +155,7 @@ const INFO_LIST = [
];
import myClick from "@/mixin/click";
import env from "../../env";
import { mapMutations } from "vuex";
export default {
mixins: [myClick],
data() {
......@@ -202,7 +205,7 @@ export default {
carlist: [],
employeeList: [],
f_key: Date.now(),
errorTip: false
errorTip: false,
};
},
onLoad(options) {
......@@ -211,12 +214,13 @@ export default {
title: text,
});
this.$store.dispatch("getCustomerInfo").then((customerInfo) => {
console.log(customerInfo,' =======')
this.formData = customerInfo
console.log(customerInfo, " =======");
this.formData = customerInfo;
this.isPass = Object.values(customerInfo).every((value) => !!value);
});
},
methods: {
...mapMutations("audio", ["setBooks"]),
// 上传图
choose(index) {
uni.chooseImage({
......@@ -266,22 +270,23 @@ export default {
submit() {
console.log(this.formData);
try {
for(let i in this.formData) {
if (!this.formData[i] && i != 'salesUuid') throw i
for (let i in this.formData) {
if (!this.formData[i] && i != "salesUuid") throw i;
}
if (Object.values(this.formData).every((value) => !!value)) {
this.messageBoxVisible = false;
this.setBooks(this.infoList);
this.stopAudio();
uni.reLaunch({
url: "/pages/home/home",
});
}
if (Object.values(this.formData).every((value) => !!value)) {
this.messageBoxVisible = false;
this.stopAudio(this.infoList);
uni.reLaunch({
url: "/pages/home/home",
});
}
} catch (error) {
console.log(error)
this.formObject.find(item => item.key == error).error = true
console.log(this.formObject)
this.f_key = Date.now()
this.errorTip = true
console.log(error);
this.formObject.find((item) => item.key == error).error = true;
console.log(this.formObject);
this.f_key = Date.now();
this.errorTip = true;
}
},
// 取消
......@@ -301,20 +306,20 @@ export default {
this.formData.staffName = item.staffName;
} else this.formData.carModel = item.name;
this.$store.dispatch("setCustomerInfo", this.formData);
console.log(this.formData)
this.formObject.map(item => item.error = false)
this.f_key = Date.now()
this.errorTip = false
console.log(this.formData);
this.formObject.map((item) => (item.error = false));
this.f_key = Date.now();
this.errorTip = false;
},
showPopup(e) {
this[e] = true;
},
blur(popkey) {
console.log(popkey)
this.formObject.find(item => item.key == popkey).error = false
this.f_key = Date.now()
this.errorTip = false
}
console.log(popkey);
this.formObject.find((item) => item.key == popkey).error = false;
this.f_key = Date.now();
this.errorTip = false;
},
},
};
</script>
......@@ -457,7 +462,7 @@ export default {
box-sizing: border-box;
padding: 0 40rpx;
&.error {
border: 2rpx solid #F24724;
border: 2rpx solid #f24724;
}
.input,
.select {
......
......@@ -11,6 +11,7 @@ export default {
namespaced: true,
state() {
return {
booksList: [],
audioList: [],
isStart: false,
isEnd: false,
......@@ -22,6 +23,9 @@ export default {
setAudioList(state, data) {
state.audioList = data;
},
setBooks(state, data) {
state.booksList = data;
},
setAudioStart(state, data) {
state.isStart = data;
if (data)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!