Commit 99ae6410 by 胡悦

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

2 parents e9eaca41 f062db94
......@@ -29,8 +29,8 @@
class="form-item"
:key="index"
>
<view class="label">{{ i.label }}</view>
<view :class="['value', { error: showError(i.key) },{disabled:customerType == 0}]">
<view :class="['label',{required:i.required}]">{{ i.label }}</view>
<view :class="['value', { error: showError(i.key) && i.required },{disabled:customerType == 0}]">
<template v-if="i.type == 'input'">
<input
:type="i.inputType"
......@@ -108,7 +108,8 @@ const formObject_boutique = [{
type: "input",
inputType: "text",
maxlength: 50,
placeholder: '请输入姓名'
placeholder: '请输入姓名',
required: true
},
{
label: "车型",
......@@ -123,14 +124,16 @@ const formObject_boutique = [{
type: "input",
inputType: "tel",
maxlength: 11,
placeholder: '请输入电话'
placeholder: '请输入电话',
required: true
},
{
label: "交付专员",
key: "staffName",
type: "select",
popKey: "employeeBoxVisible",
placeholder: '请选择交付专员'
placeholder: '请选择交付专员',
required: true
},]
export default {
components: { Employee, CarBrands },
......@@ -155,7 +158,8 @@ export default {
type: "input",
inputType: "text",
maxlength: 50,
placeholder: '请输入姓名'
placeholder: '请输入姓名',
required: true
},
{
label: "车主电话",
......@@ -163,21 +167,24 @@ export default {
type: "input",
inputType: "tel",
maxlength: 11,
placeholder: '请输入电话'
placeholder: '请输入电话',
required: true
},
{
label: "车型",
key: "carModel",
type: "select",
popKey: "carBrandListVisible",
placeholder: '请选择车型'
placeholder: '请选择车型',
required: true
},
{
label: "销售姓名",
key: "staffName",
type: "select",
popKey: "employeeBoxVisible",
placeholder: '请选择销售'
placeholder: '请选择销售',
required: true
},
],
formData: {
......@@ -236,8 +243,8 @@ export default {
return this.errorTip && flag
},
showPopup (e) {
let {customerType} = this
if(customerType == 0) return
let { customerType } = this
if (customerType == 0) return
this.$refs[e].open();
},
// 取消
......@@ -253,9 +260,11 @@ export default {
check (all = false) {
let flag = true
try {
Object.keys(this.formData).map(key => {
if (!this.formData[key]) throw false
if (!all && key == 'phoneNumber' && this.formData[key] && !phoneRex.test(this.formData[key])) throw false
this.formObject.map(e => {
if (e.required) {
if (!this.formData[e.key]) throw false
if (!all && e.key == 'phoneNumber' && !phoneRex.test(this.formData[e.key])) throw false
}
})
} catch (error) {
flag = error
......@@ -305,13 +314,13 @@ export default {
step = Object.values(customerInfo).every((value) => !!value) ? 2 : 1
this.errorTip = false
if (sceneType == 1) {
receptionStatus = 1 //精品默认1
step = 1
this.formObject = formObject_boutique
if (customerType == 0 && !this.check()) return uni.showToast({
title: '请选择回店客户',
icon: 'none'
})
receptionStatus = 1 //精品默认1
step = 1
this.formObject = formObject_boutique
}
if (step == 2 && !this.check()) {
this.errorTip = true
......@@ -364,6 +373,8 @@ export default {
margin-left: auto;
flex-shrink: 0;
width: 124rpx;
}
.required {
&::before {
content: "*";
color: #ff0000;
......@@ -410,7 +421,7 @@ export default {
color: #c9c9c9;
}
}
.disabled{
.disabled {
background: #f4f4f4;
}
}
......
......@@ -64,6 +64,7 @@ import Reception from "./components/Reception.vue";
import { mapMutations } from "vuex";
import invitation from "./invitation.vue";
import Case from "./case.vue";
import history from "./history.vue";
export default {
components: {
ToolBox,
......@@ -72,6 +73,7 @@ export default {
Reception,
invitation,
Case,
history
},
mixins: [myClick],
props: {
......@@ -108,6 +110,7 @@ export default {
7: "reception",
13: "invitation",
9: "Case",
12:'history'
}[id];
return name;
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!