mushencc 3 anos atrás
pai
commit
ef6e70085f

+ 4 - 6
src/components/footer/index.vue

@@ -1,7 +1,9 @@
 <template>
     <div class="footer-page">
         <div>
-            <Page :page-size-opts="[10, 20, 30, 40,100,1000]" @on-page-size-change='changeSize' @on-change='changePage' :current='pageIndex' show-total :total="total" show-sizer :page-size='pageSize' />
+            <Page
+            show-elevator
+            :page-size-opts="[10, 20, 30, 40,100,1000]" @on-page-size-change='changeSize' @on-change='changePage' :current='pageIndex' show-total :total="total" show-sizer :page-size='pageSize' />
         </div>
         
     </div>
@@ -23,13 +25,9 @@ export default {
             default:10,
         }
     },
-    data(){
-        return {
-            
-        }
-    },
     mounted(){
         // this.placement.push(this.total)
+        // this.page = this.pageIndex
     },
     methods:{
         changePage(e){

+ 9 - 0
src/routerMap/index.js

@@ -324,6 +324,15 @@ const routerMap = [{
             require(['@/views/ProductionOrderList/Dispatchlist/list'], resolve),
     },
     {
+        path: '/cms/productionorderlist/workOver/list',
+        name: 'workOverList', //生产订单列表-->返工单
+        meta: {
+            index: 4
+        },
+        component: (resolve) =>
+            require(['@/views/ProductionOrderList/workOver/list'], resolve),
+    },
+    {
         path: '/cms/productionorderlist/dispatchlist/confirm',
         name: 'DispatchConfirm', //生产订单列表-->派工单工序列表
         meta: {

+ 49 - 18
src/views/ProcessRoute/index.vue

@@ -13,7 +13,7 @@
       :pageIndex="pageIndex"
       :total="total"
     >
-      <div slot="titleButton" style="display:flex;">
+      <div slot="titleButton" style="display: flex">
         <Upload
           v-if="persimissionData['批量导入'] || persimissionData.all"
           name="your_file"
@@ -23,7 +23,7 @@
           :on-success="uploadSuccess"
           :action="$store.state.ip + '/api/process_route_index_import'"
         >
-          <Button type="success" ghost icon="md-exit" style="margin-right:10px;"
+          <Button type="success" ghost icon="md-exit" style="margin-right: 10px"
             >批量导入</Button
           >
         </Upload>
@@ -33,7 +33,7 @@
           type="warning"
           ghost
           icon="md-return-left"
-          style="margin-right:10px;"
+          style="margin-right: 10px"
           >批量导出</Button
         >
         <Button
@@ -52,7 +52,7 @@
       <template slot="set" slot-scope="{ row }">
         <div class="table-set">
           <svg
-            style="font-size:20px"
+            style="font-size: 20px"
             color="#3764FF"
             @click="goPage(4, row)"
             class="icon icon-nav"
@@ -62,7 +62,7 @@
           </svg>
           <svg
             v-if="persimissionData['编辑'] || persimissionData.all"
-            style="font-size:20px"
+            style="font-size: 20px"
             color="#3764FF"
             @click="goPage(2, row)"
             class="icon icon-nav"
@@ -71,7 +71,7 @@
             <use xlink:href="#iconbianji"></use>
           </svg>
           <svg
-            style="font-size:20px"
+            style="font-size: 20px"
             color="green"
             @click="goPage(3, row)"
             class="icon icon-nav"
@@ -83,7 +83,7 @@
             v-if="persimissionData['删除'] || persimissionData.all"
             @click="delItems(row)"
             class="icon icon-nav"
-            style="font-size:20px"
+            style="font-size: 20px"
             color="red"
             aria-hidden="true"
           >
@@ -108,8 +108,8 @@
                 :label="item.title"
                 :disabled="
                   item.title == '操作' ||
-                    item.title == '已收款' ||
-                    item.title == '未收款'
+                  item.title == '已收款' ||
+                  item.title == '未收款'
                 "
                 :value="item.key"
               ></Option>
@@ -117,7 +117,7 @@
           </FormItem>
           <FormItem label="排序方式">
             <Select
-              style="width:150px"
+              style="width: 150px"
               filterable
               clearable
               transfer
@@ -174,6 +174,7 @@ import { mapState } from "vuex";
 export default {
   data() {
     return {
+      defaultPageNumber: 1, // 默认页码
       list: [
         {
           title: "工艺组合名称",
@@ -194,6 +195,7 @@ export default {
       tableData: [],
       pageIndex: 1,
       total: 0,
+      now_page: 1,
       pageSize: 10,
       proxyObj: {
         page_index: 1,
@@ -226,23 +228,46 @@ export default {
     });
   },
   methods: {
+    // 判断当前搜索是否为空搜索
+    isEmptyQuery(row) {
+      // console.log(row)
+      return !row.part_title && !row.title;
+    },
     init(row) {
-      this.pageIndex = 1;
-      row.page_index = this.pageIndex;
-      row.page_size = this.pageSize;
+      // console.log(this.proxyObj.page_index)
+
+      // 如果当前搜索条件为空,取上一次的搜索页码
+      if (this.isEmptyQuery(row)) {
+        row.page_index = this.defaultPageNumber;
+        this.now_page = this.defaultPageNumber;
+        this.pageIndex = this.defaultPageNumber;
+        row.page_size = this.pageSize;
+      } else {
+        this.pageIndex = row.page_index;
+        if (!row.page_index) {
+          row.page_index = this.now_page;
+        }
+        row.page_size = this.pageSize;
+      }
       this.proxyObj = row;
       this.getData(row);
     },
     getData(row) {
       this.loading = true;
+
       if (localStorage.getItem("process_route_sort")) {
         this.sortList = JSON.parse(localStorage.getItem("process_route_sort"));
         row.sortList = this.sortList;
       }
       this.axios("/api/process_route_index", { params: row }).then((res) => {
-        if (res.data.detail.length == 0 && this.proxyObj.page_index > 1) {
-          this.proxyObj.page_index--;
-          this.getData(this.proxyObj);
+        if (res.data.detail.length == 0 && row.page_index > 1) {
+          // this.proxyObj.page_index--;
+          const data = {
+            ...row,
+            page_index: row.page_index - 1,
+          };
+          this.init(data);
+          return;
         }
         this.loading = false;
         res.data.top.map((v, i) => {
@@ -262,7 +287,7 @@ export default {
           }
 
           if (v.hover == 1) {
-            v.render = function(h, params) {
+            v.render = function (h, params) {
               const { row } = params;
 
               return h(
@@ -303,9 +328,15 @@ export default {
     },
     changePage(e) {
       this.pageIndex = e;
+      this.now_page = e;
       this.proxyObj.page_index = this.pageIndex;
       const sortList = this.sortList.filter((item) => item.sort);
       this.proxyObj.sortList = sortList;
+      // 如果搜索条件为空的时候,记录当前页码值,下次搜索的时候使用该页码值
+      if (this.isEmptyQuery(this.proxyObj)) {
+        this.defaultPageNumber = e;
+      }
+
       this.getData(this.proxyObj);
     },
     changeSize(e) {
@@ -370,7 +401,7 @@ export default {
               }
 
               if (v.hover == 1) {
-                v.render = function(h, params) {
+                v.render = function (h, params) {
                   const { row } = params;
 
                   return h(

+ 76 - 1
src/views/ProductionOrderList/Dispatchlist/details.vue

@@ -23,17 +23,63 @@
             <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="finish(row,2)">驳回</a>
+                   <a v-if="row.sub_state<3" class="map-margin" style="color:#ed4014" @click="workoveragain(row)">返工</a>
                 </div>
             </template>
         </FullPage>
+        <div>
+             <Modal
+        title="返工"
+        v-model="modal8"
+        :mask-closable="false"
+        width='400'
+        @on-ok="onOk">
+        <Form :model="form_modal" :label-width="80"> 
+            <FormItem label="返工工序:" >
+                <Input v-model="form_modal.procedure_title" disabled >
+                </Input>
+            </FormItem>
+            <FormItem label="返工班组:">
+                  <Select v-model="form_modal.user_id" >
+                <Option :value="item.id" v-for="(item,index) in form_modal.nickname" :key="index">{{item.nickname}}</Option>
+            </Select>
+            </FormItem>
+            <FormItem label="返工原因:">
+                 <Input v-model="form_modal.rework_reason" type="textarea" :autosize="{minRows: 2,maxRows: 5}"
+                  placeholder="请输入返工原因"></Input>
+            </FormItem>
+             <!-- <FormItem>
+ <Select v-model="formItem.select">
+                <Option value="beijing">New York</Option>
+                <Option value="shanghai">London</Option>
+                <Option value="shenzhen">Sydney</Option>
+            </Select>
+            </FormItem>
+             <FormItem>
+ <Select v-model="formItem.select">
+                <Option value="beijing">New York</Option>
+                <Option value="shanghai">London</Option>
+                <Option value="shenzhen">Sydney</Option>
+            </Select>
+            </FormItem> -->
+        </Form>
+            </Modal>
+        </div>
     </div>
 </template>
 
 <script>
+import urgentSettingVue from '../../BasicSettings/urgentSetting.vue'
 export default {
     data(){
         return {
+            form_modal:{
+                nickname:[],
+                procedure_title:'',
+                user_id:'',
+                rework_reason:'',
+                id:''
+            },
             type:1,
             logList:[{title:'系统单号',value:'10998765'}],
             tableColums:[
@@ -68,6 +114,7 @@ export default {
             pageSize:10,
             total:0,
             selectIds:[],
+            modal8:false,
             proxyObj:{...this.$route.query},
         }
     },
@@ -75,6 +122,34 @@ export default {
         this.getData(this.$route.query)
     },
     methods:{
+        onOk(){
+             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
+             }).then(res=>{
+                if(res.code == 200){
+                    this.$Message.success(res.msg);
+                    this.getData(this.$route.query);
+                }
+            })
+        },
+        workoveragain(row){
+          this.modal8 = true;
+          this.form_modal.rework_reason = ''
+          this.axios.get('/api/employee_list',row).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)
+                }
+            })
+        },
         back(){
             this.$router.go(-1)
         },

+ 387 - 0
src/views/ProductionOrderList/workOver/details.vue

@@ -0,0 +1,387 @@
+<template>
+  <div>
+    <FullPage
+      title="查看详情"
+      :list="list"
+      @init="init"
+      @searchData="init"
+      :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="finish(selectIds, 1)" type="success" ghost
+          >批量完成</Button
+        >
+      </div>
+      <template slot="set" slot-scope="{ row }">
+        <div>
+          <a class="map-margin" @click="goOriginalPage(row)">原材料预算</a>
+          <a
+            v-if="row.state != 3"
+            class="map-margin"
+            style="color:#32C800"
+            @click="finish(row, 1)"
+            >完成</a
+          >
+          <a class="map-margin" @click="goDetial(row, 1)">查看详情</a>
+        </div>
+      </template>
+    </FullPage>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      type: 1,
+      logList: [{ title: "系统单号", value: "10998765" }],
+      tableColums: [
+        { type: "selection", fixed: "left", width: "90", align: "center" },
+        {
+          title: "工序分类",
+          align: "center",
+          minWidth: 150,
+          key: "basic_title",
+        },
+        {
+          title: "工序",
+          align: "center",
+          minWidth: 150,
+          key: "procedure_title",
+        },
+        { title: "班组信息", align: "center", minWidth: 150, key: "username" },
+        {
+          title: "完工状态",
+          align: "center",
+          minWidth: 100,
+          render: (h, params) =>
+            h("span", {}, params.row.state == 3 ? "已完工" : "未完工"),
+        },
+        {
+          title: "完工百分比",
+          align: "center",
+          minWidth: 120,
+          render(h, params) {
+            return h(
+              "span",
+              {},
+              parseInt(params.row.complete_rate * 100) + "%"
+            );
+          },
+        },
+        {
+          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",
+        },
+      ],
+      tableData: [{ residential_name: "dlaskdsad", state: 0, id: 99 }],
+      pageIndex: 1,
+      pageSize: 10,
+      total: 0,
+      selectIds: [],
+      proxyObj: { order_no: this.$route.query.order_no },
+      produces: [],
+      users: [],
+      house_list: [],
+      unit_list: [],
+      level_list: [],
+      room_list: [],
+      product_list: [],
+      part_list: [],
+      part_state_list: [],
+      url_number_list: [], 
+      part_label: [],
+      produce_type_list: [],
+    };
+  },
+  created() {
+    this.axios("/api/procedure_index").then(
+      (res) => (this.produces = res.data.data)
+    );
+    this.axios("/api/employee_list").then((res) => (this.users = res.data));
+  },
+  computed: {
+    list() {
+      const array = [
+        {
+          title: "楼幢",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "house",
+          optionName: "title",
+          optionValue: "id",
+          option: this.house_list,
+        },
+        {
+          title: "单元",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "unit",
+          optionName: "title",
+          optionValue: "id",
+          option: this.unit_list,
+        },
+        {
+          title: "楼层",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "level",
+          optionName: "title",
+          optionValue: "id",
+          option: this.level_list,
+        },
+        {
+          title: "房号",
+          filterable: true,
+          name: "Select",
+          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: "结束日期",
+        // },
+      ];
+      return array;
+    },
+  },
+  methods: {
+    init(row) {
+      this.pageIndex = 1;
+      row.page_size = this.pageSize;
+      row.page_index = this.pageIndex;
+      Object.assign(row, this.$route.query);
+      this.getData(row);
+    },
+    back() {
+      this.$router.go(-1);
+    },
+    getData(row) {
+      row.page_size = this.pageSize;
+      row.page_index = this.pageIndex;
+      this.axios("/api/orders_dispatch_produce_list", { params: row }).then(
+        (res) => {
+          if (res.code == 200) {
+            this.tableData = res.data.list;
+            this.logList = res.data.detail;
+            this.total = res.data.total;
+          }
+        }
+      );
+    },
+    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 params = {
+        order_no: Array.isArray(row)
+          ? row.reduce(
+              (pre, cur, n) =>
+                `${pre}${cur.order_no}${n == row.length - 1 ? "" : ","}`,
+              ""
+            )
+          : row.order_no,
+        produce_id: Array.isArray(row)
+          ? row.reduce(
+              (pre, cur, n) =>
+                `${pre}${cur.produce_id}${n == row.length - 1 ? "" : ","}`,
+              ""
+            )
+          : row.produce_id,
+        produce_time: Array.isArray(row)
+          ? row.reduce(
+              (pre, cur, n) =>
+                `${pre}${cur.produce_time}${n == row.length - 1 ? "" : ","}`,
+              ""
+            )
+          : row.produce_time,
+      };
+      this.confirmDelete({
+        content: "是否手动操作此订单生产完成",
+        title: "生产完成",
+        type: "primary",
+        then: () => {
+          this.postData(params, type);
+        },
+        cancel: () => {},
+      });
+    },
+    selectTable(e) {
+      this.selectIds = e;
+    },
+    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);
+    },
+    goDetial(row) {
+      this.$router.push({
+        path: "/cms/productionorderlist/dispatchlist/details",
+        query: {
+          order_no: this.$route.query.order_no,
+          produce_id: row.produce_id,
+          produce_time: row.produce_time,
+        },
+      });
+    },
+    goOriginalPage(row) {
+      this.$router.push({
+        path: "/cms/rawmateria/index",
+        query: {
+          order_no: row.order_no,
+          type: 9,
+          residential_name: row.residential_name,
+          produce_id: row.produce_id,
+          produce_time: row.produce_time,
+        },
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.log-list {
+  display: flex;
+  flex-wrap: wrap;
+  padding: 10px 0;
+}
+</style>

+ 271 - 0
src/views/ProductionOrderList/workOver/list.vue

@@ -0,0 +1,271 @@
+<template>
+  <div>
+    <FullPage title='返工单'
+              :list='set_list'
+              @init='init'
+              @searchData='init'
+              @changePage='changePage'
+              @changeSize='changeSize'
+              :loading='loading'
+              :tableColums='computedTable'
+              :tableData='tableData'
+              :showPage='false'
+              :page_index='page_index'
+              :total='total'>
+      <div slot='titleButton'>
+        <!-- <Button v-if='persimissionData["批量打印"]||persimissionData.all'
+                type="primary"
+                ghost>批量打印</Button> -->
+      </div>
+      <div slot='navButton'>
+        <Button v-if='persimissionData["表头设置"]||persimissionData.all'
+                @click="setupTableHeader"
+                type="primary"
+                ghost
+                icon='ios-cog'>表头设置</Button>
+      </div>
+      <template slot="basicTypeSet"
+                slot-scope="{row}">
+        <div>
+          <span v-for="item in warningList"
+                :key="item.id"
+                :style="{color:item.color}"
+                v-show="item.id==row.warning_state">{{item.title}}</span>
+        </div>
+      </template>
+      <template slot='set'
+                slot-scope='{row}'>
+        <div>
+          <a v-if='persimissionData["原材料预算"]||persimissionData.all'
+             class="map-margin"
+             @click="goOriginalPage(row)">原材料预算</a>
+          <!-- <a v-if='persimissionData["打印派工单"]||persimissionData.all'
+             class="map-margin">打印派工单</a> -->
+          <a v-if='persimissionData["详情"]||persimissionData.all'
+             class="map-margin"
+             @click="goDetial(row)">详情</a>
+        </div>
+      </template>
+      <template slot="pageSlot">
+        <div class="pageSlotStyle">
+
+          <Page :page-size-opts="[10, 20, 30, 40,100,1000]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='page_index'
+                show-total
+                :total="total"
+                show-sizer
+                :page-size='page_size' />
+        </div>
+      </template>
+    </FullPage>
+  </div>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+export default {
+  data () {
+    return {
+      tableColums: [
+        { title: '订单编号', align: 'center', key: 'order_no', fixed: 'left', width: '200' },
+        {
+          title: '订单类型', align: 'center', key: 'renovation_type', minWidth: 150,
+          render: (h, params) => h('span', {}, params.row.renovation_type == 1 ? '工装' : '家装')
+        },
+
+        { title: '紧急程度', align: 'center', key: 'warning_state', minWidth: 100, slot: 'basicTypeSet', },
+        { 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))
+        },
+        {
+          title: '派工结束时间', align: 'center', key: 'end_time', minWidth: 200,
+          render: (h, params) => h('span', {}, this.func.replaceDate(params.row.end_time * 1, 1))
+        },
+        { title: '派工人员', align: 'center', key: 'nickname', minWidth: 200 },
+        {
+          title: '预估工期', align: 'center', key: 'predict_time', minWidth: 200,
+          render: (h, params) => h('span', `${(params.row.predict_time / 8).toFixed(1)}天`)
+        },
+        { title: '操作', align: 'center', key: 'set', slot: 'set', fixed: 'right', width: '240' },
+      ],
+      tableData: [],
+      page_index: 1,
+      page_size: 10,
+      total: 0,
+      proxyObj: {},
+      loading: false,
+      tableheaders: [],
+      //详情页返回保留搜索数据
+      corssPageData: {},
+      warningList: [],
+      userList: []
+    }
+  },
+  computed: {
+    ...mapState(['persimissionData']),
+    computedTable () {
+      if (this.tableheaders.length < 1) {
+        return this.tableColums
+      }
+      return this.func.computedHeader(this.tableheaders, this.tableColums)
+    },
+    set_list () {
+      return [
+        { title: '订单编号', name: 'Input', serverName: 'order_no', placeholder: '请输入订单编号', 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: 'Select', serverName: 'renovation_type', placeholder: '请选择订单类型', value: '',
+          option: [
+            { label: '工装', value: 1 },
+            { label: '家装', value: 0 },
+          ]
+        },
+        { 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: 'Select', serverName: 'user_id', placeholder: '请选择派工人员', optionName: 'nickname', optionValue: 'id', value: '',
+          option: this.userList
+        },
+      ]
+    }
+  },
+  created () {
+    // 获取紧急程度
+    this.axios.get('/api/warning_list').then(res => { this.warningList = res.data.data })
+    // 获取用户列表
+    this.axios({ method: 'get', url: '/api/employee_list', }).then((res) => { this.userList = res.data }).catch((err) => { });
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      if (from.path != '/cms/productionorderlist/dispatchlist/confirm') {
+        localStorage.removeItem('corssPageData')
+      } else {
+        vm.firstEnter = 1
+        vm.page_index = JSON.parse(localStorage.getItem('corssPageData')).page_index
+        vm.page_size = JSON.parse(localStorage.getItem('corssPageData')).page_size
+      }
+    });
+  },
+  beforeRouteLeave (to, from, next) {
+    if (to.path == '/cms/productionorderlist/dispatchlist/confirm') {
+      this.corssPageData = {
+        'order_no': this.set_list[0].value,
+        'state': this.set_list[1].value,
+        'start_time': this.set_list[2].start_value,
+        'end_time': this.set_list[2].end_value,
+        'renovation_type': this.set_list[3].value,
+        'warning_state': this.set_list[4].value,
+        'residential_name': this.set_list[5].value,
+        'user_id': this.set_list[6].value,
+        'page_index': this.page_index,
+        'page_size': this.page_size
+      }
+      localStorage.setItem('corssPageData', JSON.stringify(this.corssPageData))
+    }
+    next(vm => {
+    });
+  },
+  methods: {
+    init (row) {
+      row.page_index = this.page_index;
+      row.page_size = this.page_size;
+      if (this.firstEnter == 1) {
+        this.corssPageData = JSON.parse(localStorage.getItem('corssPageData'))
+        row = this.corssPageData
+        this.proxyObj = row
+        this.set_list[0].value = row.order_no
+        this.set_list[1].value = row.state
+        this.set_list[2].value = row.start_time
+        this.set_list[2].value = row.end_time
+        this.set_list[3].value = row.renovation_type
+        this.set_list[4].value = row.warning_state
+        this.set_list[5].value = row.residential_name
+        this.set_list[6].value = row.user_id
+        this.firstEnter++
+        this.$nextTick(() => {
+          this.page_index = row.page_index
+          this.page_size = row.page_size
+        })
+      } else {
+        this.proxyObj = row
+      }
+      this.getData(row)
+    },
+    getData (row) {
+      this.loading = true;
+      this.axios('/api/orders_dispatch_list', { params: row }).then(res => {
+        this.loading = false;
+        if (res.code == 200) {
+          this.tableData = res.data.data;
+          this.total = res.data.total;
+          this.tableheaders = res.data.tableSet || []
+        }
+      })
+    },
+    changePage (e) {
+      this.page_index = e;
+      this.proxyObj.page_index = this.page_index;
+      this.getData(this.proxyObj)
+    },
+    changeSize (e) {
+      this.page_size = e;
+      this.proxyObj.page_size = this.page_size;
+      this.getData(this.proxyObj)
+    },
+    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',
+        query: {
+          order_no: row.order_no,
+          type: 6,
+          residential_name: row.residential_name
+        }
+      })
+    },
+    setupTableHeader () {
+      this.tableheaders.length < 1 ? this.tableheaders = this.tableColums.reduce((pre, cur) => pre.concat(cur.key), []) : ''
+      this.$setTableheader({
+        list: this.tableColums,
+        selects: this.tableheaders,
+        then: (result) => {
+          this.tableheaders = result
+          this.axios.post('/api/update/table', { id: this.$route.query.id, result }).then(res => {
+            if (res.code == 200) {
+              this.$Message.success(res.msg)
+            }
+          })
+        }
+      })
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.pageSlotStyle {
+  display: flex;
+  justify-content: center;
+  margin-top: 40px;
+}
+</style>