Commit 22145abe by 王悦

fix校验流程

parent 955b9d82
......@@ -27,12 +27,13 @@
<el-form-item label="商标名称" style="width:450px;float:left" prop="tmName">
<el-input v-model="form.tmName"></el-input>
</el-form-item>
<div style="float:left;padding-left:10px">
<el-button @click="checkname">阿里验证</el-button>
</div>
<div style="float:left;padding-left:10px" v-if="form.tmFormType==3">
<el-button @click="word2pic">文字商标在线生成</el-button>
</div>
<div style="float:left;padding-left:10px" v-if="form.tmFormType==3">
<el-button @click="checkname">阿里验证</el-button>
</div>
<div style="clear:both;"></div>
<el-form-item style="width:350px;float:left" label="商标图样_黑白" prop="picUrl">
<img width="120px" height="120px" style="border:2px dashed #e9e9e9" v-if="form.picUrl"
......
......@@ -811,23 +811,21 @@
});
},
checkname()
async checkname()
{
if (!this.form.tmName) {
return this.$message.error('商标名称不能为空!');
}
this.$root.showMask();
this.$root.getReq("/web/calculatepriceCtl/checkname", { name: this.form.tmName }).then(d => {
let d = await this.$root.getReq("/web/calculatepriceCtl/checkname", { name: this.form.tmName });
console.log(d);
if (d.data.data.Result === "PASS") {
this.$message.success(`名称可以使用`);
return true;
}else if (d.data.data.Result === "BLOCK") {
this.form.tmName = "";
this.$message.warning(d.data.data.Message)
this.$message.warning(d.data.data.Message);
return false;
}
}).finally(() => {
this.$root.hideMask();
});
},
updatePrice(){
this.form.totalSum = 0;
......@@ -924,8 +922,12 @@
}
return { code: 1 };
},
submitForm(formName) {
async submitForm(formName) {
var that = this;
if(formName == "form"){
let pass = await this.checkname();
if (!pass)return;
}
if (formName == "form" || formName == "apply") {
this.$refs[formName].validate((valid) => {
if (valid) {
......
......@@ -26,12 +26,12 @@
<el-form-item label="商标名称" style="width:450px;float:left" prop="tmName">
<el-input v-model="form.tmName"></el-input>
</el-form-item>
<div style="float:left;padding-left:10px">
<el-button @click="checkname">阿里验证</el-button>
</div>
<div style="float:left;padding-left:10px" v-if="form.tmFormType==3">
<el-button @click="word2pic">文字商标在线生成</el-button>
</div>
<div style="float:left;padding-left:10px" v-if="form.tmFormType==3">
<el-button @click="checkname">阿里验证</el-button>
</div>
<div style="clear:both;"></div>
<el-form-item style="width:350px;float:left" label="商标图样_黑白" prop="picUrl">
......
......@@ -739,23 +739,21 @@
});
},
checkname()
async checkname()
{
if (!this.form.tmName) {
return this.$message.error('商标名称不能为空!');
}
this.$root.showMask();
this.$root.getReq("/web/calculatepriceCtl/checkname", { name: this.form.tmName }).then(d => {
let d = await this.$root.getReq("/web/calculatepriceCtl/checkname", { name: this.form.tmName });
console.log(d);
if (d.data.data.Result === "PASS") {
this.$message.success(`名称可以使用`);
return true;
}else if (d.data.data.Result === "BLOCK") {
this.form.tmName = "";
this.$message.warning(d.data.data.Message)
this.$message.warning(d.data.data.Message);
return false;
}
}).finally(() => {
this.$root.hideMask();
});
},
updatePrice(){
this.form.totalSum = 0;
......@@ -791,12 +789,16 @@
selfclear(){
this.nclOne = [];
},
submitForm(formName) {
async submitForm(formName) {
var that = this;
if (that.orderErrorMsg && that.orderErrorMsg.code && that.orderErrorMsg.code != 1) {
that.$message.warning(that.orderErrorMsg.msg);
return false;
}
if(formName == "form"){
let pass = await this.checkname();
if (!pass)return;
}
var channelCode = this.$store.state.channelCode;
if (formName == "form" || formName == "apply") {
this.$refs[formName].validate((valid) => {
......
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