Explorar o código

bug修复提交

LAPTOP-16IUEB3P\Lenovo %!s(int64=2) %!d(string=hai) anos
pai
achega
4549c692f7

+ 1 - 1
src/api/produceOrder/index.js

@@ -4,7 +4,7 @@ import request from '@/utils/request';
  * 分页
  */
 export async function getPage (params) {
-  const res = await request.post('/mes/workorder/page', { params });
+  const res = await request.post('/mes/workorder/page',  params );
   if (res.data.code == 0) {
     return res.data.data;
   }

+ 2 - 1
src/views/produceOrder/components/produceOrder-search.vue

@@ -138,7 +138,8 @@
         brandNo: '',
         model: '',
         planType: '',
-        createTime: []
+        createTime: [],
+		status:''
       };
       return {
         // 表单数据

+ 35 - 13
src/views/produceOrder/index.vue

@@ -21,11 +21,12 @@
         :columns="columns"
         :datasource="datasource"
         :cache-key="`${activeName}produceOrderTable`"
+		:selection.sync="selection"
       >
         <template v-slot:toolbar>
           <el-button type="primary">工单刷新</el-button>
           <el-button type="success">领料</el-button>
-          <el-button type="success">批量完结</el-button>
+          <el-button type="success" @click="toEnd()">批量完结</el-button>
           <el-button type="success" @click="handleCreate">创建工单</el-button>
           <el-button type="success">工单操作控制</el-button>
         </template>
@@ -76,7 +77,7 @@
               type="primary"
               :underline="false"
               icon="el-icon-edit"
-              @click="planEdit(row)"
+              @click="toEnd(row)"
             >
               完结
             </el-link>
@@ -123,7 +124,8 @@
           { label: '内销计划', value: '1' },
           { label: '外销计划', value: '2' },
           { label: '预制计划', value: '3' }
-        ]
+        ],
+		selection: []
       };
     },
     computed: {
@@ -141,12 +143,12 @@
           ],
           second: [
             {
-              prop: 'empty1111',
+              prop: 'completeTime',
               label: '完成时间',
               align: 'center'
             },
             {
-              prop: 'empty1111',
+              prop: 'cycle',
               label: '生产周期',
               align: 'center'
             }
@@ -154,6 +156,13 @@
         };
 
         return [
+		  {
+		    width: 45,
+		    type: 'selection',
+		    columnKey: 'selection',
+		    align: 'center',
+			fixed: 'left'
+		  },
           {
             columnKey: 'index',
             label: '序号',
@@ -307,14 +316,27 @@
         });
       },
       // 修改计划
-      planEdit ({ id }) {
-        this.$router.push({
-          path: '/saleOrder/salesToProduction',
-          query: {
-            type: 'edit',
-            id
-          }
-        });
+      toEnd ( row ) {
+        if(row){
+			this.$confirm(`是否要完结工单【${row.code}】?`, '提醒', {
+			  confirmButtonText: '确认',
+			  cancelButtonText: '取消',
+			  type: 'warning'
+			}).then(() => {
+			  
+			}).catch(() => {         
+			});
+		}else{
+			if(!this.selection.length) return this.$message.warning('请至少选择一条工单!')
+			this.$confirm(`是否要完结${this.selection.length}条工单?`, '提醒', {
+			  confirmButtonText: '确认',
+			  cancelButtonText: '取消',
+			  type: 'warning'
+			}).then(() => {
+			  
+			}).catch(() => {         
+			});
+		}
       },
       handleTabChange () {
         this.$refs.searchRef.reset();