Commit 8c4992ee authored by zhengke's avatar zhengke

修改

parent 233563bd
...@@ -8,15 +8,15 @@ ...@@ -8,15 +8,15 @@
<div class="text-caption q-mb-lg q-px-md text-grey-6">供应商信息</div> <div class="text-caption q-mb-lg q-px-md text-grey-6">供应商信息</div>
<div class="row wrap"> <div class="row wrap">
<q-input filled stack-label maxlength="25" :dense="false" v-model="addMsg.Name" ref="Name" <q-input filled stack-label maxlength="25" :dense="false" v-model="addMsg.Name" ref="Name"
class="col-6 q-pr-lg q-pb-lg" label="供应商名称" /> class="col-6 q-pr-lg q-pb-lg" label="供应商名称" :rules="[val => !!val || '请填写供应商名称']" />
<q-input filled stack-label maxlength="25" :dense="false" v-model="addMsg.LinkMan" ref="LinkMan" <q-input filled stack-label maxlength="25" :dense="false" v-model="addMsg.LinkMan" ref="LinkMan"
class="col-6 q-pr-lg q-pb-lg" label="联系人" /> class="col-6 q-pb-lg" label="联系人" />
<q-input filled stack-label maxlength="25" :dense="false" v-model="addMsg.LinkTel" ref="LinkTel" <q-input filled stack-label maxlength="25" :dense="false" v-model="addMsg.LinkTel" ref="LinkTel"
class="col-6 q-pr-lg q-pb-lg" label="联系电话" /> class="col-6 q-pr-lg q-pb-lg" label="联系电话" />
<q-input filled stack-label maxlength="100" :dense="false" v-model="addMsg.LinkAddress" ref="LinkAddress" <q-input filled stack-label maxlength="100" :dense="false" v-model="addMsg.LinkAddress" ref="LinkAddress"
class="col-6 q-pr-lg q-pb-lg" label="地址" /> class="col-6 q-pb-lg" label="地址" />
<q-input filled stack-label maxlength="200" :dense="false" v-model="addMsg.Remark" ref="Remark" <q-input filled stack-label :dense="false" maxlength="200" v-model="addMsg.Remark" type="textarea"
class="col-6 q-pr-lg q-pb-lg" label="备注" /> class="col-12" label="备注" />
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
...@@ -95,19 +95,22 @@ ...@@ -95,19 +95,22 @@
}, },
//保存供应商 //保存供应商
saveInfo() { saveInfo() {
this.saveLoading = true; this.$refs.Name.validate();
saveSupplier(this.addMsg).then(res => { if (!this.$refs.Name.hasError) {
this.saveLoading = false this.saveLoading = true;
this.$q.notify({ saveSupplier(this.addMsg).then(res => {
icon: 'iconfont icon-chenggong', this.saveLoading = false
color: 'accent', this.$q.notify({
timeout: 2000, icon: 'iconfont icon-chenggong',
message: '数据保存成功!', color: 'accent',
position: 'top' timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit("success");
this.closeSaveForm();
}) })
this.$emit("success"); }
this.closeSaveForm();
})
} }
} }
} }
......
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