ysy 2 жил өмнө
parent
commit
aef19d2cf6

+ 7 - 5
src/views/materialPlan/components/materialPlan-search.vue

@@ -12,7 +12,7 @@
 
       <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 5 }">
         <el-form-item label="计划状态:" label-width="80px">
-          <el-select v-model="where.statusList" placeholder="请选择" class="w100">
+          <el-select v-model="status" placeholder="请选择" class="w100">
             <el-option v-for="item in statusOpt[activeName]" :label="item.label" :value="item.value"
               :key="item.value"></el-option>
           </el-select>
@@ -46,7 +46,7 @@ export default {
     const defaultWhere = {
 
 
-      statusList: '',
+      statusList: null,
       code: '',
       releaseTime: [],
       deliveryTime: [],
@@ -55,7 +55,9 @@ export default {
     return {
       // 表单数据
       where: { ...defaultWhere },
-      treeData: []
+      treeData: [],
+
+      status: null
     };
   },
   computed: {
@@ -68,7 +70,7 @@ export default {
     activeName: {
       handler() {
         if (this.activeName) {
-          this.where.statusList = this.statusOpt[this.activeName][0].value;
+          this.status = this.statusOpt[this.activeName][0].value;
           this.reset();
         }
       },
@@ -91,7 +93,7 @@ export default {
       delete where.deliveryTime;
       delete where.createTime;
 
-      where.statusList = where.statusList.split(',');
+      where.statusList = this.status;
 
       this.$emit('search', where);
     },

+ 19 - 17
src/views/materialPlan/index.vue

@@ -22,7 +22,8 @@
         </template>
 
         <template v-slot:approvalStatus="{ row }">
-           <el-link  type="primary" :underline="false"  @click="handleDetails(row)" >  {{ approvalStatusFormatter(row.approvalStatus) }} </el-link>
+          <el-link type="primary" :underline="false" @click="handleDetails(row)"> {{
+            approvalStatusFormatter(row.approvalStatus) }} </el-link>
         </template>
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
@@ -35,8 +36,9 @@
             删除
           </el-link>
 
-          <el-link type="primary" :underline="false" @click="todo(row)" v-if="row.approvalStatus == 0 || row.approvalStatus == 3">
-            提交 
+          <el-link type="primary" :underline="false" @click="todo(row)"
+            v-if="row.approvalStatus == 0 || row.approvalStatus == 3">
+            提交
           </el-link>
         </template>
       </ele-pro-table>
@@ -70,29 +72,26 @@ export default {
       pageType: 'add',
       dialogTitle: '',
       isBindPlan: false,
+
+
       statusOpt: {
         first: [
-          { label: '所有状态', value: '' },
+          { label: '所有状态', value: null },
           { label: '待排产', value: '1' },
           { label: '待发布', value: '2' },
           { label: '发布失败', value: '3' },
-          { label: '待生产', value: '4' },
-          { label: '生产中', value: '5' },
           { label: '已完成', value: '6' },
-          { label: '已延期', value: '7' },
-          { label: '待下达', value: '8' }
+
         ],
         second: [
-          { label: '所有状态', value: '' },
-          { label: '待生产', value: '4' },
-          { label: '生产中', value: '5' },
+          { label: '所有状态', value: null },
+          { label: '待排产', value: '1' },
+          { label: '待发布', value: '2' },
+          { label: '发布失败', value: '3' },
           { label: '已完成', value: '6' },
-          { label: '已延期', value: '7' }
         ]
       },
 
-
-
       approvalStatusOpt: {
         first: [
 
@@ -242,19 +241,22 @@ export default {
 
     /* 刷新表格 */
     reload(where = {}) {
-      where.statusList = this.statusOpt[this.activeName][0].value.split(',');
+       if(where.statusList) {
+        console.log(where.statusList)
+        where.statusList =  where.statusList.split(',')
+       }
       this.$nextTick(() => {
         this.$refs.table.reload({ page: 1, where });
       });
     },
 
     handleDetails(row) {
-      if(row.status == 0) {
+      if (row.status == 0) {
         this.$message.info('未提交没有审核流程')
       } else {
         this.$refs.detailRef.open(row.processInstanceId);
       }
-     
+
     }