chrislee 1 жил өмнө
parent
commit
334e7a6ab9

+ 14 - 0
src/views/modules/tech/product-add-or-update.vue

@@ -109,6 +109,12 @@
 <!--          </el-form-item>-->
 <!--        </el-col>-->
 <!--      </el-row>-->
+      <el-row>
+        <el-form-item label="关联物料" prop="materialId">
+          <el-input v-model="dataForm.materialId" :disabled="display" placeholder="请选择物料"></el-input>
+          <el-button @click="selectMaterial">选择</el-button>
+        </el-form-item>
+      </el-row>
       <el-row>
         <el-col>
           <el-form-item label="备注" prop="notes">
@@ -242,6 +248,7 @@ export default {
       productListVisible: false,
       materialListVisible: false,
       drawListVisible: false,
+      materialCompVisible: false,
       visible: false,
       display: false,
       optionsType: [],
@@ -461,6 +468,13 @@ export default {
     },
     removeDrawingItem (index) {
       this.drawingList.splice(index, 1)
+    },
+    // 选择物料
+    selectMaterial () {
+      this.materialCompVisible = true
+      // this.$nextTick(() => {
+      //   this.$refs.materialComp.init()
+      // })
     }
   }
 }

+ 2 - 2
src/views/modules/tech/product-management.vue

@@ -747,7 +747,7 @@ export default {
         if (!this.treeMap.has(row.productId)) {
           this.treeMap.set(row.productId, {row, treeNode, resolve})
         }
-  
+
         console.log(row, treeNode, resolve)
         getChildren(row.productId).then(({data}) => {
           if (data && data.code === '200') {
@@ -766,7 +766,7 @@ export default {
         })
       },
       handleExpandChange (row, expanded) {
-        console.log(row, expanded)
+        // console.log(row, expanded)
         if (expanded) {
           this.expandedRowKeys.push(row.productId)
         } else {

+ 40 - 0
src/views/modules/warehouse/stock-dialog.vue

@@ -0,0 +1,40 @@
+<template>
+  <el-dialog
+    title="选择物料"
+    width="70%"
+    :close-on-click-modal="false"
+    :visible.sync="visible"
+    @close="onChose"
+  >
+  <div class="stock">
+
+  </div>
+    <span slot="footer">
+        <el-button @click="onChose">返回</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  name: 'stock-dialog',
+  components: {},
+  data () {
+    return {
+      visible: false
+    }
+  },
+  methods: {
+    onChose () {
+      this.visible = false
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+/deep/ .my-row .super-flow__node {
+  width: 180px;
+  height: 80px;
+}
+</style>