瀏覽代碼

出库页面增加乐观锁防止状态覆盖

liyuan 2 天之前
父節點
當前提交
807e9985a2
共有 1 個文件被更改,包括 17 次插入1 次删除
  1. 17 1
      src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

+ 17 - 1
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -311,7 +311,7 @@ export default {
         //     value: 'id'
         //   },
         //   dicUrl: '/api/blade-sales-part/goodsDesc/list?current=1&size=10&cname={{key}}&enableOrNot=1'
-        // }, 
+        // },
         {
           label: '商品名称',
           prop: 'goodsName',
@@ -680,6 +680,22 @@ export default {
             bizTypeName: "FHGD",
             filesList: this.filesList
           }).then(res => {
+              if (res.data.code === 601) {
+                  console.info('11111111111----', res)
+                  if (this.onLoad.id && this.detailData.id) {
+                      console.log(1);
+                      this.refresh(this.onLoad.id, true)
+                      this.$set(this.optionForm, 'disabled', true)
+                  } else if (this.onLoad.id) {
+                      console.log(2);
+                      this.refresh(this.onLoad.id, true)
+                  }
+                  this.$message({
+                      type: "error",
+                      message: res.data.msg
+                  });
+                  return true
+              }
             this.$message.success("保存成功");
             this.refresh(res.data.data.id)
             loading.close();