Explorar el Código

修改BOM的bug

695593266@qq.com hace 9 meses
padre
commit
6172fe3e60

+ 1 - 1
src/views/material/BOMmanage/components/attribute.vue

@@ -159,7 +159,7 @@
         <el-col :span="8" label-width="100px">
           <el-form-item label="属性类型:" prop="componentAttribute">
             <el-select
-              v-model="attributeData.category.componentAttribute"
+              v-model="attributeData.componentAttribute"
               disabled
               filterable
               multiple

+ 9 - 0
src/views/material/product/components/index-data.vue

@@ -431,6 +431,15 @@
             align: 'center',
             showOverflowTooltip: true
           },
+          // {
+          //   prop: 'categoryLevelPath',
+          //   label: 'BOM状态',
+          //   align: 'center',
+          //   showOverflowTooltip: true,
+          //   formatter: (row, column) => {
+          //     return row.isUnpack == 1 ? '是' : '否';
+          //   }
+          // },
           {
             prop: 'brandNum',
             align: 'center',

+ 40 - 21
src/views/material/product/components/index-search.vue

@@ -8,13 +8,11 @@
     @submit.native.prevent
   >
     <el-row :gutter="10">
-
       <el-col v-bind="styleResponsive ? { lg: 3, md: 6 } : { span: 3 }">
-        <el-form-item label=""  label-width="20px">
+        <el-form-item label="" label-width="20px">
           <el-checkbox v-model="where.allSearch">全局</el-checkbox>
         </el-form-item>
-      
-        </el-col>
+      </el-col>
       <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
         <el-form-item label="关键词">
           <el-input
@@ -26,8 +24,6 @@
         </el-form-item>
       </el-col>
 
-
-
       <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
         <el-form-item label="编码">
           <el-input
@@ -49,16 +45,28 @@
         </el-form-item>
       </el-col>
 
+      <!-- <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
+        <el-form-item label="BOM状态">
+          <el-input
+            clearable
+            size="small"
+            v-model.trim="where.name"
+            placeholder="请输入"
+          />
+        </el-form-item>
+      </el-col> -->
+
       <!-- <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
         <el-form-item label="组织机构:">
           <auth-selection v-model.trim="where.deptIds" style="width: 100%"></auth-selection>
         </el-form-item>
       </el-col> -->
-
-
     </el-row>
     <el-row>
-      <el-col v-bind="styleResponsive ? { md: 24} : { span: 24 }" style="display: flex;justify-content: flex-end">
+      <el-col
+        v-bind="styleResponsive ? { md: 24 } : { span: 24 }"
+        style="display: flex; justify-content: flex-end"
+      >
         <el-form-item>
           <el-button
             size="mini"
@@ -75,7 +83,7 @@
             icon="el-icon-refresh"
             class="ele-btn-icon"
             size="mini"
-          >重置</el-button
+            >重置</el-button
           >
 
           <!-- <el-button
@@ -107,7 +115,17 @@
         defaultWhere,
         // 表单数据
         where: { ...defaultWhere },
-        loading:false
+        loading: false,
+        bomTypeList: [
+          {
+            id: 1,
+            label: '有'
+          },
+          {
+            id: 0,
+            label: '无'
+          }
+        ]
       };
     },
     computed: {
@@ -128,18 +146,19 @@
       },
 
       resetAllSearch() {
-        this.$set(this.where,'allSearch',false)
+        this.$set(this.where, 'allSearch', false);
       },
-      
+
       // 刷新数据
-      refreshData(){
-          this.loading = true;
-          syncMateriel().then(res=>{
-             if(res=='0'){
-               this.loading = false;
-                this.$message.success('数据刷新成功!')
-                this.search()
-             }
+      refreshData() {
+        this.loading = true;
+        syncMateriel()
+          .then((res) => {
+            if (res == '0') {
+              this.loading = false;
+              this.$message.success('数据刷新成功!');
+              this.search();
+            }
           })
           .catch((e) => {
             this.loading = false;

+ 3 - 3
src/views/material/product/detail.vue

@@ -440,7 +440,7 @@
       categoryId: '',
       checkDepart: null,
       sampleProportion: null,
-      sampleProportionUnit:'%',
+      sampleProportionUnit: '%',
       checkPerson: null,
       checkProportion: null,
       createTime: '',
@@ -457,7 +457,7 @@
       categoryId: '',
       checkDepart: null,
       sampleProportion: null,
-      sampleProportionUnit:'%',
+      sampleProportionUnit: '%',
       checkPerson: null,
       checkProportion: null,
       createTime: '',
@@ -474,7 +474,7 @@
       categoryId: '',
       checkDepart: null,
       sampleProportion: null,
-      sampleProportionUnit:'%',
+      sampleProportionUnit: '%',
       checkPerson: null,
       checkProportion: null,
       createTime: '',