采购管理 确认的时候校验必填字段是否录入,没有则弹编辑弹框,否则 请求接口提交
| | |
| | | }, |
| | | // 确认发货 |
| | | btnConfirm(row) { |
| | | this.$confirm("是否提交?", "提示", { |
| | | let string='是否提交?' |
| | | if(!row.supplierName){ |
| | | string='您有必填字段未录入,请检查数据完整性。' |
| | | } |
| | | this.$confirm(string, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | if(!row.supplierName){ |
| | | this.btnEdit(row) |
| | | }else{ |
| | | submitPurchase({ id: row.ID,status:2 }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("提交成功") |
| | |
| | | this.$message.warning("提交失败") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | },(e)=>{ |
| | | console.error(e) |
| | | }) |