Przeglądaj źródła

Merge branch 'test' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into dev

yusheng 9 miesięcy temu
rodzic
commit
d130ee97ac

+ 20 - 1
src/views/material/product/components/index-data.vue

@@ -139,6 +139,14 @@
       </template>
 
       <template v-slot:action="{ row }">
+        <!-- <el-link
+          type="primary"
+          :underline="false"
+          @click="openEdit(row, 1)"
+          v-if="$hasPermission('main:category:update')"
+        >
+          {{ row.isEnabled == 1 ? '停用' : '启用' }}
+        </el-link> -->
         <el-link
           type="primary"
           :underline="false"
@@ -454,6 +462,16 @@
             label: '级别',
             align: 'center',
             showOverflowTooltip: true
+          },
+            {
+            prop: 'bomStatus',
+            label: 'BOM状态',
+            align: 'center',
+            minWidth: 120,
+            formatter: (row, column) => {
+              return row.bomStatus == 1 ? '有' : '无';
+            },
+            showOverflowTooltip: true
           },
           {
             prop: 'isUnpack',
@@ -485,6 +503,7 @@
             },
             showOverflowTooltip: true
           },
+        
 
           {
             prop: 'measuringUnit',
@@ -797,7 +816,7 @@
             {
               columnKey: 'action',
               label: '操作',
-              width: 220,
+              width: 260,
               align: 'center',
               resizable: false,
               slot: 'action',

+ 29 - 23
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
@@ -48,17 +44,25 @@
           />
         </el-form-item>
       </el-col>
-
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
+        <el-form-item label="BOM状态">
+          <el-select v-model="where.bomStatus" style="width: 100%">
+            <el-option :value="1" label="有"></el-option>
+            <el-option :value="0" label="无"></el-option>
+          </el-select>
+        </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 +79,7 @@
             icon="el-icon-refresh"
             class="ele-btn-icon"
             size="mini"
-          >重置</el-button
+            >重置</el-button
           >
 
           <!-- <el-button
@@ -101,13 +105,14 @@
       const defaultWhere = {
         name: '',
         code: '',
-        modelType: ''
+        modelType: '',
+        bomStatus:''
       };
       return {
         defaultWhere,
         // 表单数据
         where: { ...defaultWhere },
-        loading:false
+        loading: false
       };
     },
     computed: {
@@ -128,18 +133,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;