|
@@ -170,6 +170,7 @@
|
|
|
if (valid) {
|
|
|
if(this.form.id){//修改
|
|
|
const param = Object.assign({},this.form);
|
|
|
+ param.name=param.name.trim();
|
|
|
this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
|
api.addQcType(param).then((res)=>{
|
|
|
if(res.data.code==0){
|
|
@@ -192,6 +193,7 @@
|
|
|
})
|
|
|
}else{//添加
|
|
|
const params = Object.assign({},this.form);
|
|
|
+ params.name=params.name.trim();
|
|
|
this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
|
api.addQcType(params).then((res)=>{
|
|
|
if(res.data.code==0){
|