Commit c3540048 authored by 黄奎's avatar 黄奎
parents 4f376f0e 44ff2421
...@@ -87,7 +87,19 @@ ...@@ -87,7 +87,19 @@
/deep/ .q-field__prepend { /deep/ .q-field__prepend {
padding-right: 0px !important; padding-right: 0px !important;
} }
.custom_Close{
width:25px;
height:25px;
background:red;
color:#fff;
text-align:center;
line-height:25px;
border-radius: 50%;
cursor: pointer;
position: absolute;
right:-10px;
top:-10px;
}
</style> </style>
<template> <template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale"> <q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale">
...@@ -123,15 +135,18 @@ ...@@ -123,15 +135,18 @@
<div class="row wrap"> <div class="row wrap">
<q-input filled v-if="objOption.CustomerType==4" stack-label maxlength="20" :dense="false" v-model="objOption.EnterpriseName" lazy-rules <q-input filled v-if="objOption.CustomerType==4" stack-label maxlength="20" :dense="false" v-model="objOption.EnterpriseName" lazy-rules
ref="EnterpriseName" class="col-6 q-pr-lg q-pb-lg" /> ref="EnterpriseName" class="col-6 q-pr-lg q-pb-lg" />
<q-select stack-label color="primary" v-else filled label="客户" option-value="CategoryId" option-label="CategoryName" <q-select stack-label color="primary" v-else filled label="请选择客户" option-value="CategoryId" option-label="CategoryName"
:options="customList" class="col-6 q-pr-lg q-pb-lg" v-model="objOption.CategoryId" emit-value map-options /> :options="customList" class="col-6 q-pr-lg q-pb-lg" v-model="objOption.CategoryId" emit-value map-options />
<template v-if="objOption.CustomerType!=4"> <template v-if="objOption.CustomerType!=4">
<div class="col-6" v-if="!isShowEdit"> <div class="col-6" v-if="!isShowEdit">
<q-btn label="立即添加" @click="isShowEdit=true" size="sm" color="primary" /> <q-btn label="立即添加" @click="isShowEdit=true" size="sm" color="primary" />
</div> </div>
<div class="col-6" v-if="isShowEdit"> <div class="col-6" v-if="isShowEdit" style="position:relative">
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.CategoryName" lazy-rules <q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.CategoryName" lazy-rules
ref="CategoryName" class="col-6 q-pb-lg" label="名称" /> ref="CategoryName" class="col-6 q-pb-lg" label="名称" />
<div class="custom_Close" @click="isShowEdit=false">
<i style="position" class="iconfont icon-guanbi1"></i>
</div>
</div> </div>
</template> </template>
</div> </div>
...@@ -323,6 +338,17 @@ ...@@ -323,6 +338,17 @@
this.$refs.CustomerName.validate(); this.$refs.CustomerName.validate();
// this.$refs.ContactNumber.validate(); // this.$refs.ContactNumber.validate();
this.$refs.Address.validate(); this.$refs.Address.validate();
if(this.objOption.CustomerType!=4){
if (this.objOption.CategoryId=='' && this.objOption.CategoryName=='') {
this.$q.notify({
type:'warning',
message: "请选择客户或输入名称",
timeout:2000,
position: "top",
});
return
}
}
if (!this.objOption.ContactNumber && !this.objOption.QQ && !this.objOption.WeChatNo) { if (!this.objOption.ContactNumber && !this.objOption.QQ && !this.objOption.WeChatNo) {
this.$q.notify({ this.$q.notify({
type:'warning', type:'warning',
......
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