浏览代码

返工单

mushencc 3 年之前
父节点
当前提交
b92f8e7220

+ 18 - 0
src/routerMap/index.js

@@ -333,6 +333,24 @@ const routerMap = [{
             require(['@/views/ProductionOrderList/workOver/list'], resolve),
     },
     {
+        path: '/cms/productionorderlist/workOver/details',
+        name: 'workOverListDetails', //生产订单列表-->返工单-->详情
+        meta: {
+            index: 4
+        },
+        component: (resolve) =>
+            require(['@/views/ProductionOrderList/workOver/details'], resolve),
+    },
+    {
+        path: '/cms/productionorderlist/workOver/confirm',
+        name: 'workOverListConfirm', //生产订单列表-->返工单-->详情-->查看详情
+        meta: {
+            index: 4
+        },
+        component: (resolve) =>
+            require(['@/views/ProductionOrderList/workOver/confirm'], resolve),
+    },
+    {
         path: '/cms/productionorderlist/dispatchlist/confirm',
         name: 'DispatchConfirm', //生产订单列表-->派工单工序列表
         meta: {

+ 82 - 18
src/views/ProductionOrderList/Dispatchlist/details.vue

@@ -16,14 +16,14 @@
             <div slot='titleButton'>
                 <Button @click="back" style="margin-right:10px;">返回</Button>
                 <Button @click="batchPrint" type="primary" style="margin-right:10px;" ghost>打印派工单</Button>
-                <Button @click="finish(selectIds,2)" type="error" style="margin-right:10px;" ghost>批量驳回</Button>
+                <Button @click="workoveragain(selectIds,2)" type="error" style="margin-right:10px;" ghost>批量返工</Button>
                 <Button @click="finish(selectIds,1)" type="success"  ghost>批量完成</Button>
             </div>
 
             <template slot='set' slot-scope='{row}'>
                 <div>
                    <a v-if="row.sub_state<3" class="map-margin" style="color:#32C800" @click="finish(row,1)">完成</a>
-                   <a v-if="row.sub_state<3" class="map-margin" style="color:#ed4014" @click="workoveragain(row)">返工</a>
+                   <a class="map-margin" style="color:#ed4014" @click="workoveragain(row,1)">返工</a>
                 </div>
             </template>
         </FullPage>
@@ -36,8 +36,9 @@
         @on-ok="onOk">
         <Form :model="form_modal" :label-width="80"> 
             <FormItem label="返工工序:" >
-                <Input v-model="form_modal.procedure_title" disabled >
-                </Input>
+                <Select v-model="form_modal.procedure_title" multiple >
+                    <Option :value="item.id" v-for="item in form_modal.procedure" :key="item.id">{{item.title}}</Option>
+                </Select>
             </FormItem>
             <FormItem label="返工班组:">
                   <Select v-model="form_modal.user_id" >
@@ -75,10 +76,11 @@ export default {
         return {
             form_modal:{
                 nickname:[],
-                procedure_title:'',
                 user_id:'',
                 rework_reason:'',
-                id:''
+                id:[],
+                procedure:[],
+                procedure_title:[],
             },
             type:1,
             logList:[{title:'系统单号',value:'10998765'}],
@@ -114,6 +116,9 @@ export default {
             pageSize:10,
             total:0,
             selectIds:[],
+            tag:[],
+            procedure_id:[],
+            state:[],
             modal8:false,
             proxyObj:{...this.$route.query},
         }
@@ -126,7 +131,9 @@ export default {
              this.axios.post('/api/orders_plan_cancer',{
                  rework_reason:this.form_modal.rework_reason,
                  user_id:this.form_modal.user_id,
-                  id:this.form_modal.id
+                  id:this.form_modal.id,
+                  procedure_id:this.form_modal.procedure_title,
+                  tag:this.tag
              }).then(res=>{
                 if(res.code == 200){
                     this.$Message.success(res.msg);
@@ -134,22 +141,66 @@ export default {
                 }
             })
         },
-        workoveragain(row){
-          this.modal8 = true;
-          this.form_modal.rework_reason = ''
-          this.axios.get('/api/employee_list',row).then(res=>{
+        workoveragain(row,type){
+           this.form_modal.rework_reason = '';
+          switch(type){
+              //返工
+              case 1:
+                   this.modal8 = true;
+                   this.tag = [];
+                   this.form_modal.id = [];
+                   this.form_modal.procedure_title = [];
+           console.log(row)
+           this.form_modal.user_id = row.user_id
+          this.form_modal.id.push(row.id) 
+          this.tag.push(row.chip)
+          const id = [];
+          id.push(row.id);
+           this.axios.get('/api/employee_list').then(res=>{
                 if(res.code == 200){
                     // this.$Message.success(res.msg);
                     // this.getData(this.$route.query)
-                    console.log(res)
                     this.form_modal.nickname = res.data
-                    this.form_modal.procedure_title = row.procedure_title
-                    this.form_modal.user_id = row.user_id
-                    this.form_modal.id = row.id
-                    console.log(row)
                 }
             })
-        },
+         this.axios.post('/api/orders_dispatch_procedure',{id}).then(res=>{
+                if(res.code == 200){
+                    // this.$Message.success(res.msg);
+                    // this.getData(this.$route.query)
+                    this.form_modal.procedure = res.data
+                }
+            })
+            break;
+            //批量返工
+            case 2:
+                //若没有选择产品
+               if(row.length == 0){
+                   this.$Message.warning('请选择产品!')
+               }else{  
+                   this.form_modal.procedure_title = [];
+                   //选择了请求班组数据
+                    this.axios.get('/api/employee_list').then(res=>{
+                       if(res.code == 200){
+                    this.form_modal.nickname = res.data
+                }
+            })
+               //请求产品数据,此时的row是选择产品id的数组
+                this.axios.post('/api/orders_dispatch_procedure',{id:row}).then(res=>{
+                if(res.code == 200){ 
+                    this.modal8 = true;
+                    // this.$Message.success(res.msg);
+                    // this.getData(this.$route.query)
+                    this.form_modal.procedure = res.data
+                     this.form_modal.user_id = this.tableData[0].user_id
+                    // this.form_modal.procedure_title.push(this.procedure_id[0])
+                    this.form_modal.id = row 
+                }
+                else{
+                    
+                }
+               })
+          }
+        }},
         back(){
             this.$router.go(-1)
         },
@@ -182,14 +233,27 @@ export default {
                 type:type == 1 ? 'primary' : 'error',
                 then:()=>{
                     this.postData({id:str},type)
+                    
                 },
                 cancel:()=>{}
             })
         },
         selectTable(e){
             let result = [];
-            e.map(v=>result.push(v.id));
+            let tag = [];
+            let procedure_id = [];
+            let state = [];
+            e.map(v=>{
+                result.push(v.id)
+                tag.push(v.chip)
+                procedure_id.push( v.procedure_id)
+                state.push(v.sub_state)
+            });
             this.selectIds = result;
+            this.tag = tag;
+            this.procedure_id = procedure_id
+            this.state = state 
+           console.log(this.state)
         },
         changePage(e){
             this.pageIndex = e;

+ 1 - 1
src/views/ProductionOrderList/ProductionPlanlist/details.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <FullPage
-      title="生产计划详情"
+      title="生产排产详情"
       :list="list"
       @init="init"
       :logList="logList"

+ 1 - 1
src/views/ProductionOrderList/ProductionPlanlist/list.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <FullPage
-      title="生产计划列表"
+      title="生产排产列表"
       :list="set_list"
       @init="init"
       @searchData="searchData"

+ 3 - 3
src/views/ProductionOrderList/ProductionsOrder/Decorationlist.vue

@@ -39,7 +39,7 @@
           ghost
           style="margin-right: 10px"
           @click="openModal(selects)"
-          >批量下生产计划</Button
+          >批量下生产排产</Button
         >
         <Button type="primary" ghost>批量打印订单</Button>
       </div>
@@ -50,7 +50,7 @@
           <!-- <a @click="bingChip(row)">绑定芯片</a> -->
           <!-- <a @click="bingChip(row)" v-if="row.tagnum&&row.part_tag">更换芯片</a> -->
           <a @click="openModal(row)" :disabled="row.part_state != 0"
-            >下生产计划</a
+            >下生产排产</a
           >
           <!-- <a @click="downImg(row.url,row.product_title)">下载图纸</a> -->
         </div>
@@ -829,7 +829,7 @@ export default {
         this.planInfo.pr_id = row.pr_id;
       }
       this.downProduction({
-        title: "下生产计划",
+        title: "下生产排产",
         type: 1,
         params: this.planInfo,
         then: (e) => {

+ 3 - 3
src/views/ProductionOrderList/ProductionsOrder/list.vue

@@ -19,7 +19,7 @@
                 ghost>批量打印二维码</Button> -->
         <Button @click="openModal(selects)"
                 type="primary"
-                ghost>批量下生产计划</Button>
+                ghost>批量下生产排产</Button>
       </div>
 
       <div slot='navButton'>
@@ -52,7 +52,7 @@
           <a v-if='persimissionData["下生产计划"]||persimissionData.all'
              style="margin:0 5px"
              :disabled="row.is_plan==2"
-             @click="openModal(row)">下生产计划</a>
+             @click="openModal(row)">下生产排产</a>
         </div>
       </template>
       <template slot="pageSlot">
@@ -285,7 +285,7 @@ export default {
         this.planInfo.order_no = row.order_no;
       }
       this.downProduction({
-        title: '下生产计划',
+        title: '下生产排产',
         type: 1,
         params: this.planInfo,
         then: (e) => { this.getData(this.proxyObj) },

+ 232 - 0
src/views/ProductionOrderList/workOver/confirm.vue

@@ -0,0 +1,232 @@
+<template>
+    <div>
+        <FullPage 
+        title='查看详情' 
+        :showTopSearch='false' 
+        :logList='logList'
+        @selectTable='selectTable'
+        @changePage='changePage'
+        @changeSize='changeSize'
+        :tableColums='tableColums'
+        :tableData='tableData'
+        :pageIndex='pageIndex'
+        :pageSize='pageSize'
+        :total='total'
+        >   
+            <div slot='titleButton'>
+                <Button @click="back" style="margin-right:10px;">返回</Button>
+                <Button @click="batchPrint" type="primary" style="margin-right:10px;" ghost>打印派工单</Button>
+                <Button @click="del(selectIds,2)" type="error" style="margin-right:10px;" ghost>批量删除</Button>
+                <Button @click="finish(selectIds,1)" type="success"  ghost>批量完成</Button>
+            </div>
+
+            <template slot='set' slot-scope='{row}'>
+                <div>
+                   <a v-if="row.sub_state<3" class="map-margin" style="color:#32C800" @click="finish(row,1)">完成</a>
+                   <a  class="map-margin" style="color:#ed4014" @click="del(row,1)">删除</a>
+                </div>
+            </template>
+        </FullPage>
+    </div>
+</template>
+
+<script>
+export default {
+    data(){
+        return {
+            form_modal:{
+                nickname:[],
+                user_id:'',
+                rework_reason:'',
+                id:[],
+                procedure:[],
+                procedure_title:[],
+            },
+            type:1,
+            logList:[{title:'系统单号',value:'10998765'}],
+            tableColums:[
+                {type:'selection',fixed:'left',width:'90',align:'center'},
+                {title:'房间号',align:'center',key:'number_detail',minWidth:150,
+                    render:(h,params)=>{
+                        const {row} = params
+                        return h('span',`${row.house}-${row.unit}-${row.layer}-${row.number_detail}`)
+                    }
+                },
+                {title:'产品',align:'center',minWidth:150,key:'product_title'},
+                {title:'位置',align:'center',minWidth:150,key:'position'},
+                {title:'部件',align:'center',minWidth:150,key:'part_title'},
+                {title:'零部件',align:'center',minWidth:150,key:'part_detail_title'},
+                {title:'部件是否贴标签',align:'center',minWidth:150,
+                    render:(h,params)=>h('span',{},params.row.label == '1' ? '是' : '否')
+                },
+                // {title:'贴标签零部件',align:'center',minWidth:150,key:'sub_part'},
+                {title:'工序分类',align:'center',minWidth:150,key:'basic_title'},
+                {title:'工序',align:'center',minWidth:150,key:'procedure_title'},
+                {title:'班组',align:'center',minWidth:150,key:'nickname'},
+                {title:'测量尺寸',align:'center',minWidth:150,key:'measure'},
+                {title:'单位',align:'center',minWidth:100,key:'company'},
+                {title:'芯片编号',align:'center',minWidth:150,key:'chip'},
+                {title:'完工状态',align:'center',minWidth:100,
+                    render:(h,params)=>h('span',{},params.row.sub_state == 3 ? '已完工' : '未完工')
+                },
+                {title:'操作',align:'center',slot:'set',fixed:'right',width:'150'},
+            ],
+            tableData:[],
+            pageIndex:1,
+            pageSize:10,
+            total:0,
+            selectIds:[],
+            tag:[],
+            produce_id:[],
+            id:[],
+            modal8:false,
+            proxyObj:{...this.$route.query},
+        }
+    },
+    mounted(){
+        this.getData(this.$route.query)
+    },
+    methods:{
+       del(row,type){
+      switch(type){
+        case 1:
+           
+            let id = [];
+            id.push(row.id)
+            console.log(this.tableData)
+   
+         this.confirmDelete({
+        content: "确认删除么?",
+        then: () => {
+          this.axios
+            .post("/api/orders_rework_del", {
+              order_no:this.logList[0].value,
+              produce_id:this.produce_id,
+              id:id
+              })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$Message.success(res.msg);
+                this.getData({order_no:this.logList[0].value,
+                  produce_id:this.produce_id
+                });
+              }
+            });
+        },
+      });
+      break;
+      case 2:
+          if(row.length == 0){
+              this.$Message.error('请选择要删除的产品')
+          }else{   this.confirmDelete({
+        content: "确认删除么?",
+        then: () => {
+          this.axios
+            .post("/api/orders_rework_del", {
+              order_no:this.logList[0].value,
+              produce_id:this.produce_id,
+              id:this.id
+              })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$Message.success(res.msg);
+                this.getData({order_no:this.logList[0].value,
+                produce_id:this.produce_id});
+              }
+            });
+        },
+      });}
+        
+      }
+    },
+        back(){
+            this.$router.go(-1)
+        },
+        getData(row){
+            row.page_size = this.pageSize
+            row.page_index = this.pageIndex
+            this.axios('/api/orders_rework_detail',{params:row}).then(res=>{
+                if(res.code == 200){
+                    this.tableData = res.data.list;
+                    this.logList = res.data.detail;
+                    this.total = res.data.total;
+                    this.produce_id = res.data.produce_id
+                }
+            })
+        },
+        postData(data,type){
+            let url = type == 1 ? '/api/orders_dispatch_confirm' : '/api/orders_plan_cancer'
+            this.axios.post(url,data).then(res=>{
+                if(res.code == 200){
+                    this.$Message.success(res.msg);
+                    this.getData(this.$route.query)
+                }
+            })
+        },
+        finish(row,type){
+            if(!row||row.length<1){return this.$Message.warning('请至少选择一项')}
+            let str = Array.isArray(row) ? row.join(',') : row.id
+            this.confirmDelete({
+                content:type == 1 ? '是否手动操作此订单生产完成' : '确认驳回?',
+                title:type == 1 ? '生产完成' : '驳回',
+                type:type == 1 ? 'primary' : 'error',
+                then:()=>{
+                    this.postData({id:str},type)
+                    
+                },
+                cancel:()=>{}
+            })
+        },
+        selectTable(e){
+           
+            let id = [];
+            let result = [];
+            e.map(v=>{
+                result.push(v.id)
+                id.push(v.id)
+            });
+            this.selectIds = result;
+           this.id =id;
+            console.log(this.id);
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.proxyObj.page_index = this.pageIndex;
+            this.getData(this.proxyObj)
+        },
+        changeSize(e){
+            this.pageSize = e;
+            this.proxyObj.page_size = this.page_size;
+            this.getData(this.proxyObj)
+        },
+        batchPrint(){
+            this.confirmForm({
+            title:'批量打印派工单',
+            forms:[
+                {name:'Select',title:'模板',value:'',serverName:'template_id',placeholder:'请选择模板',
+                    option:[
+                        {label:'木工',value:1},
+                        {label:'开料',value:2},
+                        {label:'贴皮',value:3},
+                        {label:'油漆',value:4},
+                        {label:'接、拼板',value:6}
+                    ]
+                },
+            ],
+            then:(result)=>{
+                this.axios('/api/produce_export',{params:{...result,...this.$route.query}}).then(res=>{
+                        if(res.code == 200){
+                        let url = `${this.$store.state.ip}/api/storage/${res.data.file}`
+                        location.href = url
+                    }
+                })
+            }
+        })
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.log-list{display: flex;flex-wrap:wrap;padding:10px 0;}
+</style>

+ 95 - 113
src/views/ProductionOrderList/workOver/details.vue

@@ -17,12 +17,13 @@
     >
       <div slot="titleButton">
         <Button @click="back" style="margin-right:10px;">返回</Button>
+        <Button @click="del(selectIds,2)" type="error" ghost style="margin-right:10px;">批量删除</Button>
         <Button @click="finish(selectIds, 1)" type="success" ghost
           >批量完成</Button
         >
       </div>
       <template slot="set" slot-scope="{ row }">
-        <div>
+        <div >
           <a class="map-margin" @click="goOriginalPage(row)">原材料预算</a>
           <a
             v-if="row.state != 3"
@@ -32,6 +33,7 @@
             >完成</a
           >
           <a class="map-margin" @click="goDetial(row, 1)">查看详情</a>
+           <a class="map-margin" @click="del(row,1)" style="color:red">删除</a>
         </div>
       </template>
     </FullPage>
@@ -85,12 +87,26 @@ export default {
           render: (h, params) =>
             h("span", {}, this.func.replaceDate(params.row.produce_time * 1)),
         },
+          {
+          title: "预计完工时间",
+          align: "center",
+          minWidth: 200,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDate(params.row.produce_time * 1)),
+        },
+          {
+          title: "完工时间",
+          align: "center",
+          minWidth: 200,
+          render: (h, params) =>
+            h("span", {}, this.func.replaceDate(params.row.produce_time * 1)),
+        },
         {
           title: "操作",
           align: "center",
           slot: "set",
           fixed: "right",
-          width: "250",
+          width: "270",
         },
       ],
       tableData: [{ residential_name: "dlaskdsad", state: 0, id: 99 }],
@@ -104,13 +120,19 @@ export default {
       house_list: [],
       unit_list: [],
       level_list: [],
-      room_list: [],
+      room_list: [ 
+        { label: '未完工', value: 0 },
+            { label: '已完工', value: 1 },
+            { label: '返工未完工', value: 2 },
+             { label: '返工已完工', value: 3 }
+            ],
       product_list: [],
       part_list: [],
       part_state_list: [],
       url_number_list: [], 
       part_label: [],
       produce_type_list: [],
+      produce_id:[]
     };
   },
   created() {
@@ -123,7 +145,7 @@ export default {
     list() {
       const array = [
         {
-          title: "楼幢",
+          title: "工序分类",
           filterable: true,
           name: "Select",
           value: "",
@@ -133,7 +155,7 @@ export default {
           option: this.house_list,
         },
         {
-          title: "单元",
+          title: "工序",
           filterable: true,
           name: "Select",
           value: "",
@@ -143,7 +165,7 @@ export default {
           option: this.unit_list,
         },
         {
-          title: "楼层",
+          title: "班组",
           filterable: true,
           name: "Select",
           value: "",
@@ -153,122 +175,76 @@ export default {
           option: this.level_list,
         },
         {
-          title: "房号",
+          title: "完工状态",
           filterable: true,
           name: "Select",
-          value: "",
+          value: '',
           serverName: "room",
-          optionName: "title",
-          optionValue: "id",
           option: this.room_list,
         },
         {
-          title: "产品",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "product",
-          optionName: "title",
-          optionValue: "id",
-          option: this.product_list,
-        },
-        {
-          title: "部件",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "part",
-          optionName: "title",
-          optionValue: "id",
-          option: this.part_list,
-        },
-        {
-          title: "部件状态",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "part_state",
-          optionName: "title",
-          optionValue: "id",
-          option: this.part_state_list,
-        },
-        {
-          title: "图号",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "url_number",
-          optionName: "title",
-          optionValue: "id",
-          option: this.url_number_list,
-        },
-        {
-          title: "部件是否贴标签",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "part_label",
-          optionName: "title",
-          optionValue: "id",
-          option: this.part_label_list,
-        },
-        {
-          title: "工序分类",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "produce_type",
-          optionName: "title",
-          optionValue: "id",
-          option: this.produce_type_list,
-        },
-        {
-          title: "工序",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "produce_id",
-          optionName: "title",
-          optionValue: "id",
-          option: this.produces,
-        },
-        // {
-        //   title: "班组信息",
-        //   filterable: true,
-        //   name: "Select",
-        //   value: "",
-        //   optionName: "nickname",
-        //   optionValue: "id",
-        //   serverName: "user_id",
-        //   option: this.users,
-        // },
-        {
-          title: "完工状态",
-          name: "Select",
-          value: "",
-          serverName: "produce",
-          option: [
-            { label: "未完工", value: 1 },
-            { label: "已完工", value: 3 },
-          ],
-        },
-        // {
-        //   title: "派工时间",
-        //   name: "Input",
-        //   start_server: "start_time",
-        //   end_server: "end_time",
-        //   start_value: "",
-        //   end_value: "",
-        //   isDate: true,
-        //   serverName: "id2",
-        //   start_placeholder: "开始日期",
-        //   end_placeholder: "结束日期",
-        // },
+          title: "派工时间",
+          name: "Input",
+          start_server: "start_time",
+          end_server: "end_time",
+          start_value: "",
+          end_value: "",
+          isDate: true,
+          serverName: "id2",
+          start_placeholder: "开始日期",
+          end_placeholder: "结束日期",
+        }
       ];
       return array;
     },
   },
   methods: {
+    del(row,type){
+      switch(type){
+        case 1:
+            let num = [];
+      num.push(row.produce_id);
+         this.confirmDelete({
+        content: "确认删除么?",
+        then: () => {
+          this.axios
+            .post("/api/orders_rework_produce_del", {
+              order_no:row.order_no,
+              produce_id:num
+              })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$Message.success(res.msg);
+                this.getData(row);
+                // this.undata_navData();
+              }
+            });
+        },
+      });
+      break;
+      case 2:
+        if(row.length == 0){
+          this.$Message.error('清选择要删除的数据')
+        }else{ this.confirmDelete({
+        content: "确认删除么?",
+        then: () => {
+          this.axios
+            .post("/api/orders_rework_produce_del", {
+              order_no:this.logList[0].value,
+              produce_id:this.produce_id
+              })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$Message.success(res.msg);
+                this.getData({order_no:this.logList[0].value});
+                // this.undata_navData();
+              }
+            });
+        },
+      });}
+          
+      }
+    },
     init(row) {
       this.pageIndex = 1;
       row.page_size = this.pageSize;
@@ -282,7 +258,7 @@ export default {
     getData(row) {
       row.page_size = this.pageSize;
       row.page_index = this.pageIndex;
-      this.axios("/api/orders_dispatch_produce_list", { params: row }).then(
+      this.axios("/api/orders_rework_produce_list", { params: row }).then(
         (res) => {
           if (res.code == 200) {
             this.tableData = res.data.list;
@@ -341,6 +317,12 @@ export default {
     },
     selectTable(e) {
       this.selectIds = e;
+      let num = [];
+      e.forEach(item => {
+        num.push(item.produce_id)
+      });
+      this.produce_id = num
+      console.log(this.produce_id)
     },
     changePage(e) {
       this.pageIndex = e;
@@ -354,7 +336,7 @@ export default {
     },
     goDetial(row) {
       this.$router.push({
-        path: "/cms/productionorderlist/dispatchlist/details",
+        path: "/cms/productionorderlist/workOver/confirm",
         query: {
           order_no: this.$route.query.order_no,
           produce_id: row.produce_id,

+ 24 - 20
src/views/ProductionOrderList/workOver/list.vue

@@ -36,9 +36,8 @@
       <template slot='set'
                 slot-scope='{row}'>
         <div>
-          <a v-if='persimissionData["原材料预算"]||persimissionData.all'
-             class="map-margin"
-             @click="goOriginalPage(row)">原材料预算</a>
+          <a class="map-margin"
+             @click="del(row)" style="color:red">删除</a>
           <!-- <a v-if='persimissionData["打印派工单"]||persimissionData.all'
              class="map-margin">打印派工单</a> -->
           <a v-if='persimissionData["详情"]||persimissionData.all'
@@ -76,7 +75,7 @@ export default {
         },
 
         { title: '紧急程度', align: 'center', key: 'warning_state', minWidth: 100, slot: 'basicTypeSet', },
-        { title: '项目名称', align: 'center', key: 'residential_name', minWidth: 200 },
+        { title: '小区', align: 'center', key: 'residential_name', minWidth: 200 },
         {
           title: '派工开始时间', align: 'center', key: 'start_time', minWidth: 200,
           render: (h, params) => h('span', {}, this.func.replaceDate(params.row.start_time * 1, 1))
@@ -117,14 +116,14 @@ export default {
       return [
         { title: '订单编号', name: 'Input', serverName: 'order_no', placeholder: '请输入订单编号', value: '' },
         {
-          title: '派工状态', name: 'Select', placeholder: '请选择', serverName: 'state', value: '',
+          title: '订单状态', name: 'Select', placeholder: '请选择', serverName: 'state', value: '',
           option: [
             { label: '未生产', value: 0 },
             { label: '生产中', value: 1 },
             { label: '生产完成', value: 2 },
           ]
         },
-        { title: '开始派工时间', name: 'Input', start_server: 'start_time', end_server: 'end_time', start_value: '', end_value: '', isDate: true, serverName: 'id2', start_placeholder: '开始日期', end_placeholder: '结束日期' },
+        { title: '派工开始时间', name: 'Input', start_server: 'start_time', end_server: 'end_time', start_value: '', end_value: '', isDate: true, serverName: 'id2', start_placeholder: '开始日期', end_placeholder: '结束日期' },
         {
           title: '订单类型', name: 'Select', serverName: 'renovation_type', placeholder: '请选择订单类型', value: '',
           option: [
@@ -133,7 +132,7 @@ export default {
           ]
         },
         { title: '紧急程度', name: 'Select', serverName: 'warning_state', placeholder: '请选择', value: '', optionName: 'title', optionValue: 'id', option: this.warningList },
-        { title: '项目名称', name: 'Input', serverName: 'residential_name', placeholder: '请输入项目名称', value: '' },
+        { title: '小区名称', name: 'Input', serverName: 'residential_name', placeholder: '请输入项目名称', value: '' },
         {
           title: '派工人员', name: 'Select', serverName: 'user_id', placeholder: '请选择派工人员', optionName: 'nickname', optionValue: 'id', value: '',
           option: this.userList
@@ -178,6 +177,22 @@ export default {
     });
   },
   methods: {
+    del(row){
+       this.confirmDelete({
+        content: "确认删除么?",
+        then: () => {
+          this.axios
+            .post("/api/orders_rework_list_del", {order_no:row.order_no})
+            .then((res) => {
+              if (res.code == 200) {
+                this.$Message.success(res.msg);
+                this.getData();
+                // this.undata_navData();
+              }
+            });
+        },
+      });
+    },
     init (row) {
       row.page_index = this.page_index;
       row.page_size = this.page_size;
@@ -205,7 +220,7 @@ export default {
     },
     getData (row) {
       this.loading = true;
-      this.axios('/api/orders_dispatch_list', { params: row }).then(res => {
+      this.axios('/api/orders_rework_list', { params: row }).then(res => {
         this.loading = false;
         if (res.code == 200) {
           this.tableData = res.data.data;
@@ -226,20 +241,9 @@ export default {
     },
     goDetial (row) {
       this.$router.push({
-        // path:'/cms/productionorderlist/dispatchlist/details',
-        path: '/cms/productionorderlist/dispatchlist/confirm',
-        query: {
-          order_no: row.order_no,
-        }
-      })
-    },
-    goOriginalPage (row) {
-      this.$router.push({
-        path: '/cms/rawmateria/index',
+        path: '/cms/productionorderlist/workOver/details',
         query: {
           order_no: row.order_no,
-          type: 6,
-          residential_name: row.residential_name
         }
       })
     },