Commit 818f9de9 by 前端

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

2 parents 802eb7d4 1f07588e
...@@ -139,13 +139,7 @@ export default { ...@@ -139,13 +139,7 @@ export default {
popKey: 'employeeBoxVisible' popKey: 'employeeBoxVisible'
} }
], ],
customerInfo: { customerInfo: this.$store.state.user.customerInfo
customerName: '',
carModel: '',
phoneNumber: '',
salesUuid: '',
staffName: ''
}
} }
}, },
mounted () { mounted () {
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<media_6 :views="media[id]" /> <media_6 :views="media[id]" />
</view> </view>
<pay-pop ref="pay"></pay-pop> <pay-pop ref="pay"></pay-pop>
<template v-if="type != 'preview'"> <template v-if="type != 'preview'">
<view <view
class="pen-box" class="pen-box"
@click="drawStatus = !drawStatus" @click="drawStatus = !drawStatus"
...@@ -150,6 +150,7 @@ export default { ...@@ -150,6 +150,7 @@ export default {
}, },
// 完成接待 // 完成接待
done () { done () {
this.$store.dispatch('clearCustomerInfo')
this.stopAudio(); this.stopAudio();
uni.navigateBack(); uni.navigateBack();
}, },
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<template v-for="(i, index) in formObject"> <template v-for="(i, index) in formObject">
<view class="form-item" :key="index"> <view class="form-item" :key="index">
<view class="label">{{ i.label }}</view> <view class="label">{{ i.label }}</view>
<view class="value"> <view :class="['value', { error: i.error }]">
<template v-if="i.type == 'input'"> <template v-if="i.type == 'input'">
<input <input
:type="i.inputType" :type="i.inputType"
...@@ -260,6 +260,15 @@ export default { ...@@ -260,6 +260,15 @@ export default {
console.log(this.formData); console.log(this.formData);
this.messageBoxVisible = false; this.messageBoxVisible = false;
this.stopAudio(this.infoList); this.stopAudio(this.infoList);
// this.messageBoxVisible = false;
try {
for (let i in this.formData) {
if (!this.formData[i]) throw i;
}
} catch (error) {
this.formData[i].error = true;
}
this.stopAudio();
}, },
// 选择车型与销售 // 选择车型与销售
showPop(key) { showPop(key) {
......
...@@ -3,14 +3,20 @@ ...@@ -3,14 +3,20 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-04-07 18:15:11 * @Date: 2024-04-07 18:15:11
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 19:23:10 * @LastEditTime: 2024-04-09 19:49:48
*/ */
// import { setToken, getToken, removeToken } from '@/utils/token';; // import { setToken, getToken, removeToken } from '@/utils/token';;
export default { export default {
state() { state() {
return { return {
customerInfo: {}, customerInfo: {
customerName: "",
carModel: "",
phoneNumber: "",
salesUuid: "",
staffName: "",
},
}; };
}, },
mutations: { mutations: {
...@@ -20,14 +26,26 @@ export default { ...@@ -20,14 +26,26 @@ export default {
setCustomerInfo(state, data) { setCustomerInfo(state, data) {
state.customerInfo = data; state.customerInfo = data;
}, },
clearCustomerInfo(state) {
state.customerInfo = {
customerName: "",
carModel: "",
phoneNumber: "",
salesUuid: "",
staffName: "",
};
},
}, },
actions: { actions: {
// 获取用户详情 // 获取用户详情
async getCustomerInfo({ commit }) { getCustomerInfo({ state }) {
return commit("getCustomerInfo"); return state.customerInfo;
}, },
async setCustomerInfo({ commit }, value) { setCustomerInfo({ commit }, value) {
commit("setCustomerInfo", value); commit("setCustomerInfo", value);
}, },
clearCustomerInfo({ commit }) {
commit("clearCustomerInfo");
},
}, },
}; };
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!