|
|
@ -396,11 +396,39 @@ export default { |
|
|
this.$message.error(fields[Object.keys(fields)[0]][0].message); |
|
|
this.$message.error(fields[Object.keys(fields)[0]][0].message); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
// { |
|
|
|
|
|
// "organizationUnitId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
|
|
// "cardTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
|
|
// "cardNo": "string", |
|
|
|
|
|
// "cardPassword": "string", |
|
|
|
|
|
// "discount": 0, |
|
|
|
|
|
// "expiryDate": "string", |
|
|
|
|
|
// "customerName": "string", |
|
|
|
|
|
// "idNo": "string", |
|
|
|
|
|
// "telephone": "string", |
|
|
|
|
|
// "mobileTelephone": "string", |
|
|
|
|
|
// "cardFlag": "string", |
|
|
|
|
|
// "remark": "string" |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
//编辑 |
|
|
//编辑 |
|
|
if (this.form.id) { |
|
|
if (this.form.id) { |
|
|
|
|
|
|
|
|
|
|
|
postapi(`/api/app/cardregister/update?id=${this.form.id}`,body).then(res =>{ |
|
|
|
|
|
if(res.code != -1){ |
|
|
|
|
|
this.$message.success("操作成功!"); |
|
|
|
|
|
lfind = arrayExistObj(this.dataList,'id',this.form.id); |
|
|
|
|
|
if(lfind > -1) objCopy(this.form,this.dataList[lfind]); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
//新增 |
|
|
//新增 |
|
|
|
|
|
postapi('/api/app/cardregister/create',body).then(res =>{ |
|
|
|
|
|
if(res.code != - 1){ |
|
|
|
|
|
this.$message.success("操作成功!"); |
|
|
|
|
|
objCopy(res.data,this.form); |
|
|
|
|
|
this.dataList.push(deepCopy(this.form)); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|