yuansh 11 months ago
parent
commit
7ba3fce726

+ 5 - 0
src/views/production/productionTotalOrder/modules/materiaWaring.vue

@@ -102,6 +102,11 @@
                 //     slots:{title:'unQuantityTitle'},
                 //     slots:{title:'unQuantityTitle'},
                 // },
                 // },
                 {
                 {
+                    title: '现存量',
+                    align:"center",
+                    dataIndex: 'storeQty',
+                    ellipsis: true,
+                },{
                     title: '项目编码',
                     title: '项目编码',
                     align:"center",
                     align:"center",
                     dataIndex: 'projectCode',
                     dataIndex: 'projectCode',

+ 20 - 2
src/views/production/productionTotalOrder/modules/productionTotalOrderAdd.vue

@@ -314,6 +314,7 @@
                     }
                     }
                 })
                 })
             },
             },
+            
              //获取子表信息
              //获取子表信息
              getTemporaryStorageData(id){
              getTemporaryStorageData(id){
                 //入库暂存
                 //入库暂存
@@ -461,8 +462,25 @@
             },
             },
             //打开材料入库弹窗
             //打开材料入库弹窗
             materiaWarehous(){
             materiaWarehous(){
-                this.$refs.materiaWaring.visible = true
-                this.$refs.materiaWaring.form.dataSource = this.originalMaterial
+              
+                  //材料明细
+                  this.originalMaterial = []//保存为增行钱的材料明细列表
+                  getAction('/productionOrder/madeProductionOrders/queryMadeProductionOrdersMaterialByMainIdAndWh',{id:this.form.id}).then(res=>{
+                      if(res.success){
+                          this.originalMaterial  = Array.from(res.result)
+                          this.$refs.material.form.dataSource =res.result
+                          this.$refs.material.planOrg=this.form.pkOrg
+                          this.$refs.material.form.dataSource.map((item,index)=>{
+                              item.rowNo =index+1
+                         })
+                         
+                         this.$refs.materiaWaring.visible = true
+                         this.$refs.materiaWaring.form.dataSource = this.originalMaterial
+                      }else{
+                        this.$message.error(res.message);
+                      }
+                  })
+              
             },
             },
             //成品入库,框/扇入库,框/扇出库执行完接口重新获取成品明细,和入库暂存列表
             //成品入库,框/扇入库,框/扇出库执行完接口重新获取成品明细,和入库暂存列表
             RefreshList(data){
             RefreshList(data){