Commit 2ccb891c authored by 罗超's avatar 罗超

1

parent a22c66c7
......@@ -112,8 +112,8 @@
</div>
<div class="row wrap">
<div class="col-6">
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.ContactNumber" lazy-rules
ref="ContactNumber" class="col-6 q-pr-lg q-pb-lg" label="联系电话" :rules="[ val => validateTel(val) || '请输入正确的11位号码']" />
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.ContactNumber" lazy-rules
ref="ContactNumber" class="col-6 q-pr-lg q-pb-lg" label="联系电话" />
</div>
<div class="col-6">
<q-input filled stack-label maxlength="40" v-model="objOption.EnterpriseName" :label="EnterpriseLabelName">
......@@ -129,8 +129,8 @@
</div>
<div class="row wrap">
<div class="col-6">
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.QQ" ref="QQ"
class="col-6 q-pr-lg q-pb-lg" label="QQ" />
<q-input filled stack-label maxlength="20" :dense="false" v-model:number="objOption.QQ" ref="QQ"
type="number" :min="0" class="col-6 q-pr-lg q-pb-lg" label="QQ" />
</div>
<div class="col-6">
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.WeChatNo" ref="wechat"
......@@ -145,11 +145,11 @@
<div class="col-6">
<!-- <q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.Account" ref="Account"
class="col-6 q-pr-lg q-pb-lg" label="账号" /> -->
<q-input filled stack-label :dense="false" v-model="objOption.Address" ref="Address" class="col-6 q-pr-lg q-pb-lg"
label="详细地址" />
<q-input filled stack-label :dense="false" v-model="objOption.Address" ref="Address"
class="col-6 q-pr-lg q-pb-lg" label="详细地址" />
</div>
<div class="col-6">
</div>
</div>
<div class="row wrap">
......@@ -195,7 +195,9 @@
SetCustomer,
GetCustomer
} from "../../api/sale/peemanagement";
import {validateTel} from '../../utils/validate'
import {
validateTel
} from '../../utils/validate'
export default {
components: {},
props: {
......@@ -215,7 +217,7 @@
Sex: 1, //性别(1-男,2-女)
Fax: "", //传真
QQ: "",
WeChatNo:"",//微信
WeChatNo: "", //微信
Email: "", //邮箱
Address: '', //详细地址
Images: "", //营业照片
......@@ -254,7 +256,7 @@
created() {},
mounted() {
this.initObj()
console.log("sss",this.customerObj)
console.log("sss", this.customerObj)
},
methods: {
//初始化表单
......@@ -310,9 +312,27 @@
//保存
saveCourse() {
this.$refs.CustomerName.validate();
this.$refs.ContactNumber.validate();
// this.$refs.ContactNumber.validate();
this.$refs.Address.validate();
if (!this.$refs.CustomerName.hasError && !this.$refs.ContactNumber.hasError && !this.$refs.Address.hasError) {
if (!this.objOption.ContactNumber && !this.objOption.QQ && !this.objOptionWeChatNo) {
this.$q.notify({
type:'warning',
message: "电话,qq,微信至少填写一个",
timeout:2000,
position: "top",
});
return
}
if(this.objOption.ContactNumber&& !validateTel(this.objOption.ContactNumber)){
this.$q.notify({
type:'warning',
message: "请输入正确的11位号码",
timeout:2000,
position: "top",
});
return
}
if (!this.$refs.CustomerName.hasError && !this.$refs.Address.hasError) {
this.saveCustomLoading = true;
SetCustomer(this.objOption).then(res => {
if (res.Code == 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment