ysy 1 год назад
Родитель
Сommit
a8ef60f072

+ 2 - 2
src/api/productionPlan/index.js

@@ -114,8 +114,8 @@ export async function updatePriority(data) {
 
 // 计划分解(获取产品BOM)
 
-export async function pageByCategoryId(params) {
-  const res = await request.get(`/main/bomCategory/pageByCategoryId`, { params });
+export async function getBom(params) {
+  const res = await request.get(`/main/bomCategory/getBom`, { params });
   if (res.data.code == 0) {
     return res.data.data;
   }

+ 13 - 5
src/views/productionPlan/components/disassemblePlanPop.vue

@@ -65,6 +65,10 @@
                 </el-input>
                 <DictSelection dictName="计量单位" v-model="unit"
               /></div>
+
+              <el-button type="primary" size="mini" @click="handleAdd"
+                >新增</el-button
+              >
             </div>
           </template>
         </ele-pro-table>
@@ -79,7 +83,7 @@
 
 <script>
   import { deepClone } from '@/utils';
-  import { pageByCategoryId } from '@/api/productionPlan/index.js';
+  import { getBom } from '@/api/productionPlan/index.js';
 
   export default {
     components: {},
@@ -179,9 +183,11 @@
           pageNum: 1,
           size: -1
         };
-        pageByCategoryId(params).then((res) => {
+        getBom(params).then((res) => {
           this.bomList = res?.list || [];
-          this.visible = true;
+          (this.baseCount = res.baseCount),
+            (this.unit = res.unit),
+            (this.visible = true);
         });
       },
 
@@ -189,10 +195,11 @@
         console.log(this.selection);
       },
 
+      handleAdd() {},
+
       cancel() {
         this.formData = {};
         this.visible = false;
-        this.$refs.form.resetFields();
       },
 
       confirm() {
@@ -212,7 +219,8 @@
   }
 
   .toolbar_box {
-    float: right;
+    display: flex;
+    justify-content: space-between;
     margin-right: 10px;
     > div {
       display: flex;