Ver Fonte

生产总订单-增加成品明细保存校验

jingbb há 11 meses atrás
pai
commit
735581c044

+ 9 - 0
src/views/production/productionTotalOrder/modules/KSOutbound.vue

@@ -357,8 +357,17 @@
             this.selectedRows = selectionRows;
         },
         handleOk(){
+            var idExistence = 'yes'
+            //判断有没有未保存数据
+            this.selectedRows.map(item=>{
+                if(!item.id||item.id==''){
+                    idExistence = 'no'
+                }
+            })
             if(this.selectedRows.length==0){
                 this.$message.warning('请勾选数据')
+            }else if(idExistence=='no'){
+                this.$message.warning('请先保存成品明细')
             }else{
                 this.loading =true
                 postAction('/productionOrder/madeProductionOrders/outMadeProductionOrdersOutList', {madeProductionOrdersInList:this.selectedRows}).then((res) => {

+ 9 - 0
src/views/production/productionTotalOrder/modules/KSWarehousing.vue

@@ -317,8 +317,17 @@
     created() {},
     methods: {
         handleOk(){
+            var idExistence = 'yes'
+            //判断有没有未保存数据
+            this.selectedRows.map(item=>{
+                if(!item.id||item.id==''){
+                    idExistence = 'no'
+                }
+            })
             if(this.selectedRows.length==0){
                 this.$message.warning('请勾选数据')
+            }else if(idExistence=='no'){
+                this.$message.warning('请先保存成品明细')
             }else{
                 this.loading =true
                 postAction('/productionOrder/madeProductionOrders/inMadeProductionOrdersOutList', {madeProductionOrdersInList:this.selectedRows}).then((res) => {

+ 9 - 0
src/views/production/productionTotalOrder/modules/productWarehousModel.vue

@@ -344,8 +344,17 @@
             //     if (success) {
             //     }
             // })
+            var idExistence = 'yes'
+            //判断有没有未保存数据
+            this.selectedRows.map(item=>{
+                if(!item.id||item.id==''){
+                    idExistence = 'no'
+                }
+            })
             if(this.selectedRows.length==0){
                 this.$message.warning('请勾选数据')
+            }else if(idExistence=='no'){
+                this.$message.warning('请先保存成品明细')
             }else{
                 postAction('/productionOrder/madeProductionOrders/syNcIn', {madeProductionOrdersFinishedList:this.selectedRows}).then((res) => {
                     if (res.success) {