liqianyi 3 rokov pred
rodič
commit
98bc093f7d

+ 10 - 4
src/views/modules/sale/outsource.vue

@@ -226,8 +226,8 @@
             <el-button v-if="isAuth('pur:commDetail:info')" type="text" size="small" @click="detailHandle(scope.row.purchaseId)">查看</el-button>
             <el-button v-if="isAuth('pur:commDetail:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.purchaseId)">编辑</el-button>
             <el-button v-if="isAuth('pur:commDetail:updatePurCommissionDetail') && (Number(scope.row.purchaseState) === 1)" type="text" size="small" @click="outsourceHandle(scope.row)">委外</el-button>
-            <el-button v-if="isAuth('pur:commDetail:infoPutIn') && (Number(scope.row.purchaseState) === 2)" type="text" size="small" @click="inBound(scope.row.purComDetailId, false)">入库</el-button>
-            <el-button v-if="isAuth('pur:commDetail:infoPutInAgain') && (Number(scope.row.purchaseState) === 5)" type="text" size="small" @click="inBound(scope.row.purComDetailId, false)">再次入库</el-button>
+            <el-button v-if="isAuth('pur:commDetail:infoPutIn') && (Number(scope.row.purchaseState) === 2)" type="text" size="small" @click="inBound(scope.row)">入库</el-button>
+            <el-button v-if="isAuth('pur:commDetail:infoPutInAgain') && (Number(scope.row.purchaseState) === 5)" type="text" size="small" @click="inBound(scope.row)">再次入库</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -487,10 +487,16 @@ export default {
       return ''
     },
     // 入库申请
-    inBound (id, display) {
+    inBound (row) {
+      if (!row) return
+      let dataForm = {...row,
+        buttonType: '1',
+        materialName: row.productName,
+        specifications: row.specificationExplian
+      }
       this.inboundVisible = true
       this.$nextTick(() => {
-        this.$refs.inbound.init(id, display)
+        this.$refs.inbound.init(0, false, dataForm)
       })
     },
     // 委外

+ 3 - 1
src/views/modules/sale/purchase.vue

@@ -399,9 +399,11 @@
       },
       // 入库
       inboundHandle (row) {
+        if (!row) return
+        let dataForm = {...row, buttonType: '1', specifications: row.specification}
         this.inboundVisible = true
         this.$nextTick(() => {
-          this.$refs.inbound.init(0, false, row)
+          this.$refs.inbound.init(0, false, dataForm)
         })
       }
     }

+ 4 - 3
src/views/modules/warehouse/stock-order-inbound.vue

@@ -126,13 +126,14 @@
         this.$emit('onChose')
       },
       async init (id, display, dataForm) {
+        console.log(dataForm)
         this.display = display
         this.id = id || 0
         this.visible = true
         this.dataForm = {}
         this.dataList = []
         if (dataForm) {
-          this.addOne(dataForm, 1)
+          this.addOne(dataForm)
         } else if (!display) {
           this.addOne()
         } else {
@@ -153,11 +154,11 @@
           })
         }
       },
-      addOne (item, outside) {
+      addOne (item) {
         // console.log(item)
         // console.log(outside)
         this.dataList.push({
-          buttonType: outside ? '1' : '0',
+          buttonType: item ? (item.buttonType ? '1' : '0') : '0',
           id: item ? item.id : '',
           amount: item ? item.amount : 0,
           applicant: item ? item.applicant : '',