采购管理 确认的时候校验必填字段是否录入,没有则弹编辑弹框,否则 请求接口提交
1个文件已修改
11 ■■■■■ 已修改文件
src/views/purchaseManage/purchase/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchaseManage/purchase/index.vue
@@ -283,12 +283,19 @@
    },
    // 确认发货
    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("提交成功")
@@ -297,6 +304,8 @@
              this.$message.warning("提交失败")
            }
          })
          }
        },(e)=>{
          console.error(e)
        })