Преглед изворни кода

轮胎采购增加条件 2023-12-20

caojunjie пре 1 година
родитељ
комит
5a59ee8410
1 измењених фајлова са 11 додато и 10 уклоњено
  1. 11 10
      src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

+ 11 - 10
src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

@@ -1157,6 +1157,10 @@ export default {
     methods: {
         // 一键入库
         oneClickStorage(){
+            if (this.form.orderItemsList.length == 0) {
+                this.$message.warning('请先添加采购明细')
+                return
+            }
             // 计算合计用于展示
             let goodsNumhe = 0
             let subTotalMoneyhe = 0
@@ -1175,6 +1179,7 @@ export default {
                 });
                 shortcutWarehousing(this.form).then(res=>{
                     this.$message.success("保存成功");
+                    this.isAddBtn = true // 表格的添加轮胎禁用
                     this.refresh(res.data.data.id)
                     loading.close();
                 }).catch(()=>{
@@ -1734,20 +1739,16 @@ export default {
                         this.$message.success("保存成功");
                         this.refresh(res.data.data.id)
                         this.isDisabledTask = false
-
-                        this.editButton = true // 让编辑按钮出来
-
-
-
+                        // this.editButton = true // 让编辑按钮出来
                         // this.isDisabledTask = false;
                         // this.viewDisabled = false;
-                        this.isAddBtn = true // 表格的添加轮胎禁用
-                        this.$set(this.optionForm, 'disabled', true)
-                        this.$set(this.optionContactsBack, 'disabled', true)
+                        this.isAddBtn = false // 表格的添加轮胎禁用
+                        this.$set(this.optionForm, 'disabled', false)
+                        this.$set(this.optionContactsBack, 'disabled', false)
                         this.isContacts = true // 基础信息联系人 和地址插槽禁用
                         // 表格的删除按钮禁用
-                        this.isDisabled = true
-                        this.isAdd = true // 表格的编辑和保存按钮禁用
+                        this.isDisabled = false
+                        this.isAdd = false // 表格的编辑和保存按钮禁用
                         loading.close();
                     }).finally(() => {
                         loading.close();