Commit a1546a24 by 前端

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

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