Browse Source

计划编码调整;生产计划列表状态加载

yijing 1 năm trước cách đây
mục cha
commit
75c45e0ba4

+ 21 - 18
src/views/materialPlan/components/produceOrder.vue

@@ -46,12 +46,12 @@ export default {
         change: [{ label: '已变更', value: '9' }]
         change: [{ label: '已变更', value: '9' }]
       },
       },
       planType: [
       planType: [
-      { label: '所有计划类型', value: null },
-          { label: '内销计划', value: '1' },
-          { label: '外销计划', value: '2' },
-          { label: '预制计划', value: '3' },
-          { label: '改型计划', value: '4' },
-          { label: '返工返修计划', value: '5' },
+        { label: '所有计划类型', value: null },
+        { label: '内销计划', value: '1' },
+        { label: '外销计划', value: '2' },
+        { label: '预制计划', value: '3' },
+        { label: '改型计划', value: '4' },
+        { label: '返工返修计划', value: '5' },
       ],
       ],
 
 
       activeName: 'first',
       activeName: 'first',
@@ -325,12 +325,12 @@ export default {
       tableData: [],
       tableData: [],
       current: null,
       current: null,
       planType: [
       planType: [
-      { label: '所有计划类型', value: null },
-          { label: '内销计划', value: '1' },
-          { label: '外销计划', value: '2' },
-          { label: '预制计划', value: '3' },
-          { label: '改型计划', value: '4' },
-          { label: '返工返修计划', value: '5' },
+        { label: '所有计划类型', value: null },
+        { label: '内销计划', value: '1' },
+        { label: '外销计划', value: '2' },
+        { label: '预制计划', value: '3' },
+        { label: '改型计划', value: '4' },
+        { label: '返工返修计划', value: '5' },
       ],
       ],
 
 
     };
     };
@@ -345,13 +345,14 @@ export default {
 
 
   },
   },
   methods: {
   methods: {
-    open(item) {
+    async open(item) {
       if (item) {
       if (item) {
         this.tableData = item;
         this.tableData = item;
       }
       }
 
 
       this.visible = true;
       this.visible = true;
-      this.reload({ page: 1 });
+      await this.reload();
+
     },
     },
 
 
     /* 表格数据源 */
     /* 表格数据源 */
@@ -368,10 +369,12 @@ export default {
 
 
     /* 刷新表格 */
     /* 刷新表格 */
     reload(where) {
     reload(where) {
-      this.$nextTick(() => {
-        if (this.$refs.table && this.$refs.table.reload)
-          this.$refs.table.reload({ page: 1, where: where });
-      })
+      if (where != undefined && where.status.length > 0) {
+        this.$nextTick(() => {
+          if (this.$refs.table && this.$refs.table.reload)
+            this.$refs.table.reload({ page: 1, where: where });
+        })
+      }
     },
     },
 
 
     handleClose() {
     handleClose() {

+ 2 - 1
src/views/materialPlan/components/producePlan.vue

@@ -326,7 +326,7 @@ export default {
         //   }
         //   }
         // },
         // },
         {
         {
-          prop: 'planCode',
+          prop: 'producePlanCode',
           label: '计划编号',
           label: '计划编号',
           showOverflowTooltip: true,
           showOverflowTooltip: true,
           align: 'center',
           align: 'center',
@@ -623,6 +623,7 @@ export default {
       this.$refs.produceOrderRef.open(this.tableData);
       this.$refs.produceOrderRef.open(this.tableData);
     },
     },
     chooseOrder(list) {
     chooseOrder(list) {
+      console.log(list, 'list222');
       let planIds = [];
       let planIds = [];
 
 
       const tableList = this.$refs.table.getData() || [];
       const tableList = this.$refs.table.getData() || [];

+ 0 - 1
src/views/productionPlan/components/productionPlan-search.vue

@@ -307,7 +307,6 @@ export default {
       }
       }
 
 
       where.status = where.status.split(',');
       where.status = where.status.split(',');
-      console.log(where.status, 'status');
       this.$emit('search', where);
       this.$emit('search', where);
     },
     },
     /*  重置 */
     /*  重置 */