chencc 1 年之前
父节点
当前提交
b50e09345e

+ 7 - 0
src/api/produce/workOrder.js

@@ -267,4 +267,11 @@ export async function getInventoryTotal(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
+export async function craftFiles(data) {
+  const res = await request.post('/mes/workorder/craftFiles', data);
 
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 68 - 0
src/components/common/seekPage.vue

@@ -0,0 +1,68 @@
+<template>
+    <div class="index_box">
+        <el-form label-width="90px" :inline="true" @keyup.enter.native="search" @submit.native.prevent>
+
+            <el-form-item :label="item.label" v-for="(item, i) in seekList" :key="i">
+                <!-- input 输入 -->
+                <div v-if="item.type == 'input'">
+                    <el-input clearable v-model="item.value" :placeholder="item.placeholder"
+                        :style="{ width: item.width ? item.width + 'px' : '260px' }" />
+                </div>
+                <div v-if="item.type == 'select'">
+                    <el-select clearable v-model="item.value" :placeholder="item.placeholder"
+                        :style="{ width: item.width ? item.width + 'px' : '260px' }">
+                        <el-option v-for="op in item.planList" :label="op.label" :value="op.value"
+                            :key="item.value"></el-option>
+                    </el-select>
+                </div>
+
+            </el-form-item>
+            <el-form-item>
+                <el-button type="primary" icon="el-icon-search" class="ele-btn-icon" @click="search">
+                    查询
+                </el-button>
+                <el-button @click="reset" icon="el-icon-refresh-left" type="primary">重置</el-button>
+            </el-form-item>
+        </el-form>
+
+
+    </div>
+</template>
+
+<script>
+
+
+
+export default {
+    props: {
+        seekList: {
+            type: Array,
+            default: () => []
+        }
+    },
+
+    components: {
+
+    },
+    data() {
+        return {
+        }
+    },
+
+    computed: {
+        info() {
+            return this.$store.state.user.info;
+        }
+    },
+
+    created() {
+
+
+    },
+    methods: {
+        //  折叠悬浮中样式调整
+    },
+}
+</script>
+
+<style scoped></style>

+ 8 - 0
src/main.js

@@ -13,6 +13,13 @@ import './styles/index.scss';
 import DictSelection from '@/components/Dict/DictSelection';
 import HeaderTitle from '@/components/header-title';
 import authSelection from '@/components/authSelection';
+// 公共搜索文件
+
+import seekPage from '@/components/common/seekPage';
+
+Vue.component('seekPage', seekPage);
+
+
 Vue.component('authSelection', authSelection);
 Vue.component('HeaderTitle', HeaderTitle);
 
@@ -42,6 +49,7 @@ Vue.prototype.$math = create(all, config);
 import '@/icons';
 
 Vue.component('DictSelection', DictSelection);
+
 Vue.config.productionTip = false;
 
 Vue.use(EleAdmin, {

+ 9 - 5
src/views/produce/components/feeding/components/semiProductBom.vue

@@ -27,7 +27,11 @@
           {{ row.code }}
         </template>
       </el-table-column>
-
+      <el-table-column label="序列号" type="productSequence" minWidth="110">
+        <template slot-scope="{ row, $index }">
+          {{ row.extInfo.productSequence }}
+        </template>
+      </el-table-column>
       <el-table-column label="名称" type="name" minWidth="110">
         <template slot-scope="{ row, $index }">
           {{ row.name }} ({{
@@ -62,11 +66,11 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="包装库存" type="brandNum">
+      <!-- <el-table-column label="包装库存" type="brandNum">
         <template slot-scope="{ row, $index }">
           {{ row.packingCountBase }}/ {{ row.minUnit }}
         </template>
-      </el-table-column>
+      </el-table-column> -->
 
       <el-table-column
          v-if="clientEnvironmentId == 3 && workInfo.singleReport == 1"
@@ -85,7 +89,7 @@
       </el-table-column>
 
       <el-table-column 
-        v-if="clientEnvironmentId == 3 && workInfo.singleReport == 1"
+        v-if="workInfo.singleReport == 1"
        label="刻码" type="engrave">
         <template slot-scope="{ row, $index }">
           {{ row.extInfo.engrave }}
@@ -93,7 +97,7 @@
       </el-table-column>
 
       <el-table-column
-       v-if="clientEnvironmentId == 3 && workInfo.singleReport == 1"
+       v-if="workInfo.singleReport == 1"
         label="物料代号"
         type="materielCode"
       >

+ 4 - 2
src/views/produce/components/feeding/index.vue

@@ -22,11 +22,11 @@
 
           <workOrderBom :item="item"></workOrderBom>
 
-          <div v-if="(clientEnvironmentId == 3 || clientEnvironmentId == 5) && item.currentTaskDiagram.type == 1">
+          <div >
             <div class="title_box rx-bc">
               <div class="name">投料时间 </div>
             </div>
-            <el-date-picker v-model="item.executorTime" type="date" value-format="yyyy-MM-dd HH:dd:ss"
+            <el-date-picker v-model="item.executorTime" type="datetime" value-format="yyyy-MM-dd HH:dd:ss"
               placeholder="选择日期">
             </el-date-picker>
             <!--  -->
@@ -45,6 +45,7 @@
           </modelBom>
 
           <!-- 物料清单 -->
+          
           <instanceBom v-if="item.instanceList.length != 0" :list="item.instanceList"
             :equipmentList="item.equipmentList" :currentTaskDiagram="item.currentTaskDiagram" :workInfo="item">
           </instanceBom>
@@ -319,6 +320,7 @@ export default {
     },
 
     async save(type, index) {
+      
       this.List.forEach((f) => {
         f.instanceList.forEach((e) => {
           if (Object.prototype.hasOwnProperty.call(e, 'type')) {

+ 21 - 16
src/views/produce/components/footBtn.vue

@@ -28,16 +28,6 @@ export default {
           type: 'job',
           bjColor: '#157A2C'
         },
-        // {
-        //   name: '异常',
-        //   type: '',
-        //   bjColor: '#FF4D4F'
-        // },
-        // {
-        //   name: '副产品回收',
-        //   type: '',
-        //   bjColor: '#6639A6'
-        // },
         {
           name: '委外请托',
           type: 'Outsourcing',
@@ -82,11 +72,24 @@ export default {
           type: '',
           bjColor: '#858585'
         },
-        // {
-        //   name: '工单交接',
-        //   type: '',
-        //   bjColor: '#2B56C2'
-        // },
+        {
+          name: '工艺文件',
+          type: 'work',
+          bjColor: '#2B56C2'
+        }
+
+      ],
+      btnList3: [
+        {
+          name: '入库',
+          type: 'job',
+          bjColor: '#157A2C'
+        },
+        {
+          name: '暂停启动',
+          type: '',
+          bjColor: '#858585'
+        },
         {
           name: '工艺文件',
           type: 'work',
@@ -141,7 +144,9 @@ export default {
           
           this.$set(this, 'btnList', this.btnList2)
 
-        } else {
+        }else if (v == '5') {
+          this.$set(this, 'btnList', this.btnList3)
+        }else {
           this.$set(this, 'btnList', this.btnList1)
         }
 

+ 28 - 48
src/views/produce/components/inspection/index.vue

@@ -14,9 +14,9 @@
                     <div class="name">工单信息 </div>
 
                     <div class="rx-bc">
-                        <el-button type="text" size="mini" @click="openPicking(item.id, item)">手动添加</el-button>
-                        <el-button type="text" size="mini" @click="openPicking(item.id, item,1)">周转车质检</el-button>
-                        <el-button type="text" size="mini" @click="openQuality(item.id, item)">质检</el-button>
+                        <el-button type="primary" size="mini" @click="openPicking(item.id, item)">手动添加</el-button>
+                        <el-button type="primary" size="mini" @click="openPicking(item.id, item, 1)">周转车质检</el-button>
+                        <el-button type="primary" size="mini" @click="openQuality(item.id, item)">取样</el-button>
                     </div>
                 </div>
                 <!-- // 工单信息 -->
@@ -40,7 +40,8 @@
                                 </div>
                                 <div class="rx ww50">
                                     <div class="lable rx-cc">合格数量</div>
-                                    <div class="content">{{ item?.product?.feedQuantity }}{{ item?.product?.unit }}</div>
+                                    <div class="content">{{ item?.product?.feedQuantity }}{{ item?.product?.unit }}
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -176,13 +177,13 @@ export default {
             dialogVisible: false,
             List: [],
             idsList: [],
-            type:'job',
+            type: 'job',
             isLoad: false,
             form: {
                 quantity: '',
                 workOrderId: '',
                 taskId: '',
-                areaQuantity:[],
+                areaQuantity: [],
             },
             warehouseList: [],
 
@@ -227,7 +228,7 @@ export default {
                 quantity: '',
                 workOrderId: '',
                 taskId: '',
-                areaQuantity:[]
+                areaQuantity: []
             };
             this.dialogVisible = false;
         },
@@ -337,34 +338,8 @@ export default {
                             );
                         }
 
-                        obj.workReportInfo = {
-                            formingNum: null,
-                            formingWeight: null,
-                            formedNum: null,
-                            formedWeight: null,
-                            taskId: this.taskObj.id
-                        };
-
-                        obj.notFormedList = [
-                            {
-                                notFormedNum: null,
-                                notFormedWeight: null,
-                                weightUnit: obj.weightUnit,
-                                unit: obj.unit,
-                                warehouseId: null // 处置 仓库id
-                            }
-                        ];
-
-                        // if (obj.semiProductList.length > 0) {
-                        //     // 预制体报工
-                        //     obj.workReportInfo.formedNum = obj.semiProductList.length;
-                        // }
+           
 
-                        obj.workReportInfo.formingNum = obj.formingNum;
-                        obj.workReportInfo.formingWeight = obj.formingWeight;
-                        obj.workReportInfo.unit = obj.unit;
-                        obj.workReportInfo.weightUnit = obj.weightUnit;
-                        obj.workReportInfo.workOrderId = obj.workOrderId;
 
                         obj.paramDetailList.map((m) => {
                             if (m.extInfo.textType == 5) {
@@ -374,7 +349,12 @@ export default {
                                 ...m.extInfo
                             };
                         });
-                        console.log(obj, 444);
+
+                        if (this.taskObj.id) {
+                            obj.taskId = this.taskObj.id;
+                            obj.taskName = this.taskObj.name;
+                        }
+                        // console.log(obj, 444);
 
                         return {
                             ...obj
@@ -391,39 +371,39 @@ export default {
                 });
         },
 
-        openPicking(id, item,n) {
+        openPicking(id, item, n) {
             console.log(item.turnover);
 
             let listArr = JSON.parse(JSON.stringify(item));
 
-            if(n&&listArr.turnover.length){
+            if (n && listArr.turnover.length) {
                 let arr = [], isArr = [];
 
-                listArr.turnover.forEach(v=>{
-                    console.log(v.extInfo,'555');
-                   isArr =  v.extInfo.positionList.filter(d=> d.sampleNum)
+                listArr.turnover.forEach(v => {
+                    console.log(v.extInfo, '555');
+                    isArr = v.extInfo.positionList.filter(d => d.sampleNum)
                 })
-                if(!isArr.length){
+                if (!isArr.length) {
                     return this.$message.error('请输入取样数');
                 }
 
-                listArr.turnover.forEach(v=>{
-                    v.extInfo.positionList.map(d=>{
-                        if(d.sampleNum){
+                listArr.turnover.forEach(v => {
+                    v.extInfo.positionList.map(d => {
+                        if (d.sampleNum) {
                             d.quantity = d.sampleNum;
                             arr.push(d)
                         }
                     })
                 })
 
-            //    console.log(arr,'88888');
+                //    console.log(arr,'88888');
                 this.form.workOrderId = id;
                 this.form.taskId = item.currentTaskDiagram.taskId;
                 this.form.areaQuantity = arr;
-          
+
                 this.asyncgetQualityParam();
-             
-            }else{
+
+            } else {
                 this.$refs.pickingListRef.open(id, item);
             }
         },

+ 1 - 1
src/views/produce/components/jobBooking/components/semiProductJobBom.vue

@@ -295,7 +295,7 @@
         </template>
       </el-table-column> -->
 
-      <el-table-column label="不良原因" width="130" prop="taskName">
+      <el-table-column label="不良原因/处置" width="130" prop="taskName">
         <template slot-scope="{ row, $index }" >
           <div  v-if="row.extInfo.isQualified != 1  &&  row.extInfo.notType &&  row.extInfo.notType != 5 ">
             <span v-if="isDetails">{{ row.extInfo.notReason }}</span>

+ 4 - 1
src/views/produce/components/jobBooking/details.vue

@@ -49,13 +49,16 @@
             objData.revolvingDiskList && objData.revolvingDiskList.length > 0
           " pattern="job" :revolvingDiskList="objData.revolvingDiskList"></revolvingDiskBom>
 
+
+          <!-- //单间报工 -->
           <semiProductJobBom v-if="
             objData.semiProductList &&
-            (objData.semiProductList.length != 0) && (taskType != 6) &&
+            (objData.semiProductList.length != 0)  &&
             objData.singleReport == 1
           " :list="objData.semiProductList" :item="objData" :isDetails="true" :singleReport="objData.singleReport">
           </semiProductJobBom>
 
+          <!-- 批量报工 -->
           <semiProductJobBomPL v-if="
             objData.semiProductList &&
             (objData.semiProductList.length != 0) && (taskType != 6) &&

+ 7 - 7
src/views/produce/components/picking/details.vue

@@ -72,13 +72,13 @@
             align: 'center',
             showOverflowTooltip: true
           },
-          {
-            label: '工序',
-            prop: 'taskName',
-            width: 120,
-            align: 'center',
-            showOverflowTooltip: true
-          },
+          // {
+          //   label: '工序',
+          //   prop: 'taskName',
+          //   width: 120,
+          //   align: 'center',
+          //   showOverflowTooltip: true
+          // },
           {
             prop: 'createTime',
             label: '领料时间',

+ 59 - 0
src/views/produce/components/picking/fileBrowse.vue

@@ -0,0 +1,59 @@
+<template>
+  <el-dialog
+    title="详情"
+    :visible.sync="visible"
+    v-if="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="80%"
+  >
+    <div>
+      <iframe
+        :src="fileUrl"
+        width="100%"
+        style="height: calc(70vh - 20px); margin-top: 30px"
+        frameborder="0"
+        allowfullscreen="true"
+      ></iframe>
+    </div>
+
+    <div slot="footer">
+      <el-button @click="handleClose"> 关闭 </el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  export default {
+    components: {},
+    mixins: [],
+
+    data() {
+      return {
+  
+        fileUrl: '',
+        visible: false
+      };
+    },
+    computed: {},
+    mounted() {},
+    methods: {
+      setFileUrl(row) {
+        console.log(row);
+        let file = row.storagePath[0];
+       let fileNames=file.storePath.split('/')
+        let url = window.location.origin+'/api/main/file/getFile?objectName='+file.storePath+'&fullfilename='+fileNames[fileNames.length-1]
+        this.fileUrl = '/kkfile/onlinePreview?url=' + btoa(url);
+        this.visible = true;
+      },
+
+      handleClose() {
+        this.visible = false;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped></style>

+ 44 - 13
src/views/produce/components/picking/wokePopup.vue

@@ -2,8 +2,7 @@
     <el-dialog title="工艺文件" :visible.sync="visible" :before-close="handleClose" :close-on-click-modal="false"
         :close-on-press-escape="false" append-to-body width="80%">
 
-        <ele-pro-table ref="fileTable" :columns="jobColumns1" :datasource="datasource" :need-page="false"
-            :immediate="true">
+        <ele-pro-table ref="fileTable" :columns="jobColumns1" :datasource="workList">
             <!-- 表头工具栏 -->
 
             <template v-slot:action="{ row, $index }">
@@ -13,22 +12,24 @@
 
         <template slot="footer">
             <el-button size="mini" @click="handleClose">取 消</el-button>
-            <el-button size="mini" type="primary" @click="save()">确 定</el-button>
+            <el-button size="mini" type="primary" @click="handleClose">确 定</el-button>
         </template>
 
         <pickingList isType="pick" ref="pickingListRef" @allSelection="allSelection"></pickingList>
+        <fileBrowse  ref="browseRef"></fileBrowse>
     </el-dialog>
 </template>
 
 <script>
 import pickingList from './pickingList.vue';
-import { workorderList, getCode } from '@/api/produce/workOrder';
+import fileBrowse from './fileBrowse.vue';
+import { workorderList, getCode, craftFiles } from '@/api/produce/workOrder';
 import { typeName } from '../common.js';
 import { batchSave } from '@/api/produce/picking';
 
 export default {
     components: {
-        pickingList
+        pickingList,fileBrowse
     },
     props: {
         workListIds: {
@@ -36,11 +37,17 @@ export default {
             default() {
                 return [];
             }
+        },
+        taskId: {
+            type: String,
+            default() {
+                return null;
+            }
         }
     },
     data() {
         return {
-            visible: true,
+            visible: false,
             workList: [],
             rules: {},
 
@@ -115,15 +122,34 @@ export default {
 
     watch: {},
     methods: {
-        datasource({ page, where, limit }) {
-            return getFactoryarea({
-                ...where,
-                pageNum: page,
-                size: limit,
-                type: 3
-            });
+        // datasource({ page, where, limit }) {
+
+        //     let req = {
+        //         "taskId": this.taskId,
+        //         "workOrderId": this.workListIds[0]
+        //     }
+
+        //     return craftFiles({
+        //         ...req,
+        //         pageNum: page,
+        //         size: limit,
+        //     });
+        // },
+
+        open(req) {
+
+            craftFiles(req).then(res => {
+
+                // this.$refs.fileTable.setDate(res);
+                this.workList = res;
+            })
+
+            this.visible = true;
         },
 
+        fileDetails(row) {
+            this.$refs.browseRef.setFileUrl(row);
+        },
         async getOrderCode() {
             this.pickCode = await getCode('pick_order_code');
         },
@@ -133,9 +159,14 @@ export default {
         },
 
         handleClose() {
+            this.visible = false;
             this.$emit('close', false);
         },
 
+        getList() {
+            console.log(123);
+        },
+
         openPicking(id, item) {
             this.$refs.pickingListRef.open(id, item);
         },

+ 7 - 13
src/views/produce/components/warehousing/index.vue

@@ -35,8 +35,8 @@
           </div>
         </div>
 
+        <!-- 单独报工 -->
         <div v-else-if="item.currentTaskDiagram.type == 4 || (item.currentTaskDiagram.type == 5 && item.singleReport == 1)">
-
           <div v-if="
             item.toWarehouseList &&
             item.toWarehouseList.length > 0
@@ -47,11 +47,9 @@
                 <el-option v-for="item in warehouseList" :key="item.id" :value="item.id" :label="item.name"></el-option>
               </el-select>
             </div>
-
             <div v-for="(it, idx) in item.toWarehouseList" :key="idx">
-
-              <semiProductJobBomQT :list="it.extInfo.pickOutInList" :singleReport="item.singleReport" :item="item"
-                :equipmentList="item.equipmentList" :isWarehousing="true"></semiProductJobBomQT>
+              <packingTgBom :list="it.extInfo.pickOutInList" :singleReport="item.singleReport" :item="item"
+                :equipmentList="item.equipmentList" :isWarehousing="true"></packingTgBom>
             </div>
           </div>
         </div>
@@ -67,27 +65,23 @@
               <el-option v-for="item in warehouseList" :key="item.id" :value="item.id" :label="item.name"></el-option>
             </el-select>
           </div>
+
+          <!-- 批量报工 -->
           <div class="list_box" v-for="(d, index) in item.toWarehouseList" :key="index">
             <div class="time" style="margin-bottom: 10rpx;">打包时间: {{ d.createTime }}</div>
-        
-            <!-- <packingBom :objData="item.extInfo" :measuringUnit='item.measuringUnit'></packingBom> -->
-
             <packagingGroupingTwx ref="packagingGroupingRef" :objData="d.extInfo" :workOrderId="item.workOrderId"
             :taskId="item.currentTaskDiagram.taskId">
             </packagingGroupingTwx>
           </div>
-
-
-
           
         </div>
 
 
         <!-- item.currentTaskDiagram.type == 4 ? item.pickOutInList : item.semiProductList -->
 
-        <div v-else>
+        <!-- <div v-else>
           <el-empty :image-size="30" description="暂无数据"></el-empty>
-        </div>
+        </div> -->
 
       </div>
     </div>

+ 16 - 10
src/views/produce/index.vue

@@ -130,9 +130,8 @@
     <picking v-if="pickingShow" @close="pickingClose" :workListIds="workListIds"></picking>
 
     <!-- 工艺文件 -->
-    <wokePopup v-if="wokePopup" @close="pickingWokeClose" :workListIds="workListIds"></wokePopup>
-
-
+    <wokePopup  ref="wokePopupRef" ></wokePopup>
+<!-- :workListIds="workListIds" :taskId="taskObj.id" -->
   </div>
 </template>
 
@@ -273,11 +272,7 @@ export default {
         '6': `${data.workCenterName}-${data.name}(质检工序)`
       }
 
-
-
       this.title = obj[data.type] || '';
-
-      console.log(data.type, '11111111');
       this.type = data.type;
       let taskObj = {};
       taskObj = this.produceTaskList.find((item) => item.id === data.id);
@@ -330,7 +325,7 @@ export default {
 
       this.outObj = { ...this.outObj, ...res.data, ...this.outsourceForm };
 
-      console.log(this.outObj, 'this.outObj');
+
 
       this.isStep = false;
 
@@ -343,10 +338,13 @@ export default {
       this.workListIds = data.ids;
     },
 
+    pickingWokeClose(){
+      this.wokePopup = false;
+    },
+
     footBtn(t) {
 
       this.operationType = t;
-      console.log(this.$store.state.user.taskObj)
 
       if (
         Object.keys(this.$store.state.user.taskObj).length === 0 &&
@@ -371,7 +369,15 @@ export default {
       }
       // 工艺路线
       if (t === 'work') {
-        this.wokePopup = true;
+
+        let req ={
+          taskId: this.taskObj.id,
+          workOrderId: this.workListIds[0]
+        }
+        
+        this.$refs.wokePopupRef.open(req);
+
+  
       }
       if (t == 'feed') {
       }

+ 573 - 593
src/views/produceOrder/index.vue

@@ -1,32 +1,24 @@
 <template>
   <div class="ele-body">
     <el-card shadow="never" v-loading="loading">
-      <produceOrder-search
-        @search="reload"
-        ref="searchRef"
-        :statusOpt="statusOpt"
-        :planType="planType"
-        :activeName="activeName"
-      >
+
+      <!-- <seek-page :seekList="seekList"></seek-page> -->
+
+
+      <produceOrder-search @search="reload" ref="searchRef" :statusOpt="statusOpt" :planType="planType"
+        :activeName="activeName">
       </produceOrder-search>
+
+
+
       <el-tabs v-model="activeName" type="card">
         <el-tab-pane label="未完成工单" name="first"></el-tab-pane>
         <el-tab-pane label="已完成工单" name="second"></el-tab-pane>
       </el-tabs>
       <!-- 数据表格 -->
-      <ele-pro-table
-        ref="table"
-        :key="activeName"
-        :initLoad="false"
-        :columns="newColumns"
-        :datasource="datasource"
-        row-key="code"
-        :cache-key="`${activeName}produceOrderTable`"
-        :selection.sync="selection"
-        @sort-change="onSortChange"
-        autoAmendPage
-        :parse-data="parseData"
-      >
+      <ele-pro-table ref="table" :key="activeName" :initLoad="false" :columns="newColumns" :datasource="datasource"
+        row-key="code" :cache-key="`${activeName}produceOrderTable`" :selection.sync="selection"
+        @sort-change="onSortChange" autoAmendPage :parse-data="parseData">
         <template v-slot:toolbar>
           <el-button type="success">新建</el-button>
           <el-button type="success">暂停</el-button>
@@ -38,9 +30,7 @@
           <!-- <el-button type="success" @click="handleCreate">创建工单</el-button> -->
           <!-- <el-button type="success">工单操作控制</el-button> -->
 
-          <el-button type="success" @click="allPrinting()"
-            >批量打印二维码</el-button
-          >
+          <el-button type="success" @click="allPrinting()">批量打印二维码</el-button>
         </template>
 
         <template v-slot:code="{ row }">
@@ -50,28 +40,15 @@
         </template>
 
         <template v-slot:QRcode="{ row }">
-          <el-link type="primary" :underline="false" @click="handleQRcode(row)"
-            >生成二维码
+          <el-link type="primary" :underline="false" @click="handleQRcode(row)">生成二维码
           </el-link>
         </template>
 
         <template v-slot:priority="{ row }">
           <div style="display: flex">
-            <el-input
-              v-model="row.priority"
-              type="number"
-              size="mini"
-              :min="0"
-              :max="10"
-              @change="priorityChange(row)"
-              style="width: 80px"
-            ></el-input>
-            <el-popover
-              placement="right"
-              width="200"
-              trigger="hover"
-              content="数值越大优先级越高(0-3普通, 4-6优先, 7-10紧急)"
-            >
+            <el-input v-model="row.priority" type="number" size="mini" :min="0" :max="10" @change="priorityChange(row)"
+              style="width: 80px"></el-input>
+            <el-popover placement="right" width="200" trigger="hover" content="数值越大优先级越高(0-3普通, 4-6优先, 7-10紧急)">
               <div class="sort-wrap" slot="reference">
                 <i class="el-icon-caret-top" @click="sortTop(row)"></i>
                 <i class="el-icon-caret-bottom" @click="sortBottom(row)"></i>
@@ -96,60 +73,28 @@
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
           <template v-if="activeName == 'second'">
-            <el-link
-              type="primary"
-              :underline="false"
-              icon="el-icon-truck"
-              v-if="row.status == 6"
-              @click="toCancel(row)"
-            >
+            <el-link type="primary" :underline="false" icon="el-icon-truck" v-if="row.status == 6"
+              @click="toCancel(row)">
               取消完结
-            </el-link></template
-          >
-
-          <el-link
-              v-if="row.clientEnvironmentId==21"
-              type="primary"
-              :underline="false"
-            
-              @click="routing(row)"
-            >
-              更改工艺路线
+            </el-link></template>
+
+          <el-link v-if="row.clientEnvironmentId == 21" type="primary" :underline="false" @click="routing(row)">
+            更改工艺路线
           </el-link>
-          <template >
-            <el-link
-              type="primary"
-              :underline="false"
-              @click="toView(row)"
-            >
-              查看序列号
-            </el-link></template
-          >
+          <template>
+            <el-link type="primary" :underline="false" @click="toView(row)">
+              序列号
+            </el-link></template>
           <template v-if="activeName != 'second'">
-            <el-link
-              v-if="row.status == 4 && row.isSplit == 0"
-              type="primary"
-              :underline="false"
-              icon="el-icon-truck"
-              @click="handleOrderPublish(1, row)"
-            >
+            <el-link v-if="row.status == 4 && row.isSplit == 0" type="primary" :underline="false" icon="el-icon-truck"
+              @click="handleOrderPublish(1, row)">
               报工
             </el-link>
-            <el-link
-              v-if="row.status == 4 && row.isSplit == 0"
-              type="primary"
-              :underline="false"
-            
-              @click="toUnpack(row)"
-            >
+            <el-link v-if="row.status == 4 && row.isSplit == 0" type="primary" :underline="false"
+              @click="toUnpack(row)">
               拆分
             </el-link>
-            <el-link
-                 v-if="row.status == 4 && row.isSplit == 0"
-              type="primary"
-              :underline="false"
-              @click="toEnd(row)"
-            >
+            <el-link v-if="row.status == 4 && row.isSplit == 0" type="primary" :underline="false" @click="toEnd(row)">
               完结
             </el-link>
           </template>
@@ -174,563 +119,598 @@
 </template>
 
 <script>
-  import {
-    getPage,
-    batchCompletion,
-    cancelCompletion,
-    updatePriority,
-    update
-  } from '@/api/produceOrder/index.js';
-  import xlhView from './components/xlhView.vue';
-  import { fieldModel } from '@/api/produceWord/index.js';
-  import produceOrderSearch from './components/produceOrder-search.vue';
-  import createDialog from './components/createDialog.vue';
-  import unpackDialog from './components/unpackDialog.vue';
-  import pickingDialog from './components/pickingDialog.vue';
-  import print from './components/print.vue';
-  import printSr from './components/printSr';
-  import printTg from './components/printTg';
-  import EquipmentDialog from './components/EquipmentDialog.vue'
-  import detailsPop from './components/details/index.vue'
-
-  import { debounce } from 'lodash';
-
-
-  export default {
-    components: {
-      produceOrderSearch,
-      pickingDialog,
-      createDialog,
-      unpackDialog,
-      print,
-      printSr,
-      printTg,
-      detailsPop,
-      EquipmentDialog,
-      xlhView
-    },
-    data() {
-      return {
-        activeName: 'first',
-        id: '',
-
-        // 加载状态
-        loading: false,
-        pageType: 'add',
-        dialogTitle: '',
-        isBindPlan: false,
-        statusOpt: {
-          first: [
-            { label: '所有状态', value: '5,4' },
-            { label: '待生产', value: '4' },
-            { label: '生产中', value: '5' }
-            // { label: '已延期', value: '7' }
-          ],
-          second: [{ label: '已完成', value: '6' }]
-        },
-        planType: [
-          { label: '所有计划类型', value: null },
-          { label: '内销计划', value: '1' },
-          { label: '外销计划', value: '2' },
-          { label: '预制计划', value: '3' }
+import {
+  getPage,
+  batchCompletion,
+  cancelCompletion,
+  updatePriority,
+  update
+} from '@/api/produceOrder/index.js';
+import xlhView from './components/xlhView.vue';
+import { fieldModel } from '@/api/produceWord/index.js';
+import produceOrderSearch from './components/produceOrder-search.vue';
+import createDialog from './components/createDialog.vue';
+import unpackDialog from './components/unpackDialog.vue';
+import pickingDialog from './components/pickingDialog.vue';
+import print from './components/print.vue';
+import printSr from './components/printSr';
+import printTg from './components/printTg';
+import EquipmentDialog from './components/EquipmentDialog.vue'
+import detailsPop from './components/details/index.vue'
+
+import { debounce } from 'lodash';
+
+
+export default {
+  components: {
+    produceOrderSearch,
+    pickingDialog,
+    createDialog,
+    unpackDialog,
+    print,
+    printSr,
+    printTg,
+    detailsPop,
+    EquipmentDialog,
+    xlhView
+  },
+
+  data() {
+
+    return {
+      activeName: 'first',
+      id: '',
+
+      // 加载状态
+      loading: false,
+      pageType: 'add',
+      dialogTitle: '',
+      isBindPlan: false,
+      statusOpt: {
+        first: [
+          { label: '所有状态', value: '5,4' },
+          { label: '待生产', value: '4' },
+          { label: '生产中', value: '5' }
+          // { label: '已延期', value: '7' }
         ],
-        selection: [],
-        newColumns: []
-      };
-    },
-    computed: {
-      // 表格列配置
-      columns() {
-        const opt = {
-          first: [
-            // {
-            //   prop: 'deliveryTime',
-            //   label: '预测交货日期',
-            //   align: 'center',
-            //   showOverflowTooltip: true,
-            //   minWidth: 110
-            // }
-          ],
-          second: [
-            {
-              prop: 'completeTime',
-              label: '完成时间',
-              align: 'center'
-            },
-            {
-              prop: 'cycle',
-              label: '生产周期',
-              align: 'center'
-            }
-          ]
-        };
-
-        return [
-          {
-            width: 45,
-            type: 'selection',
-            columnKey: 'selection',
-            align: 'center',
-            fixed: 'left'
-          },
+        second: [{ label: '已完成', value: '6' }]
+      },
+      planType: [
+        { label: '所有计划类型', value: null },
+        { label: '内销计划', value: '1' },
+        { label: '外销计划', value: '2' },
+        { label: '预制计划', value: '3' }
+      ],
+      selection: [],
+      newColumns: []
+    };
+  },
+  computed: {
+    // 表格列配置
+    seekList (){
+      return [
+        {
+          label: "关键字:",
+          value: "",
+          type: "input",
+          key: '',
+          placeholder: '',
+          width: 240,
+        },
+        {
+          label: "生产工单号:",
+          value: "",
+          type: "input",
+          key: '',
+          placeholder: '',
+          width: 240,
+        },
+        {
+          label: "计划类型:",
+          value: "",
+          type: "select",
+          key: '',
+          placeholder: '',
+          width: 240,
+          // 加载状态
+          planList: this.planType
+        }
+      ];
+    } ,
+    columns() {
+      
 
-          // {
-          //   prop: 'batchNo',
-          //   label: '批次号',
-          //   align: 'center',
-          //   minWidth: 130
-          // },
 
-          {
-            slot: 'code',
-            label: '生产工单号',
-            align: 'center',
-            minWidth: 110
-          },
+      const opt = {
+        first: [
           // {
-          //   prop: 'originalCode',
-          //   label: '原始工单号',
+          //   prop: 'deliveryTime',
+          //   label: '预测交货日期',
           //   align: 'center',
+          //   showOverflowTooltip: true,
           //   minWidth: 110
-          // },
-
-          {
-            slot: 'QRcode',
-            label: '二维码',
-            align: 'center',
-            minWidth: 110
-          },
-
-          {
-            prop: 'productionPlanCode',
-            label: '计划编号',
-            align: 'center',
-            minWidth: 110
-          },
-          {
-            prop: 'planType',
-            label: '计划类型',
-            align: 'center',
-            formatter: (row) => {
-              const obj = this.planType.find((i) => i.value == row.planType);
-              return obj && obj.label;
-            }
-          },
-          {
-            prop: 'produceRoutingName',
-            label: '工艺路线',
-            align: 'center'
-          },
-          {
-            prop: 'productCode',
-            label: '编码',
-            align: 'center'
-          },
-          {
-            prop: 'productName',
-            label: '名称',
-            align: 'center'
-          },
+          // }
+        ],
+        second: [
           {
-            prop: 'brandNo',
-            label: '牌号',
+            prop: 'completeTime',
+            label: '完成时间',
             align: 'center'
           },
           {
-            prop: 'model',
-            label: '型号',
+            prop: 'cycle',
+            label: '生产周期',
             align: 'center'
-          },
+          }
+        ]
+      };
 
-          {
-            prop: 'priority',
-            label: '优先级',
-            align: 'center',
-            minWidth: 120,
-            slot: 'priority',
-            sortable: 'custom'
-          },
+      return [
+        {
+          width: 45,
+          type: 'selection',
+          columnKey: 'selection',
+          align: 'center',
+          fixed: 'left'
+        },
 
-          {
-            prop: 'formingNum',
-            label: '要求生产数量',
-            align: 'center',
-            slot: 'formingNum',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'formingWeight',
-            label: '要求生产重量',
-            slot: 'formingWeight',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'formedNum',
-            label: '已生产数量',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'formedWeight',
-            label: '已生产重量',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'planStartTime',
-            label: '计划开始时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'planCompleteTime',
-            label: '计划结束时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            prop: 'startTime',
-            label: '实际开始时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
+        // {
+        //   prop: 'batchNo',
+        //   label: '批次号',
+        //   align: 'center',
+        //   minWidth: 130
+        // },
+
+        {
+          slot: 'code',
+          label: '生产工单号',
+          align: 'center',
+          minWidth: 110
+        },
+        // {
+        //   prop: 'originalCode',
+        //   label: '原始工单号',
+        //   align: 'center',
+        //   minWidth: 110
+        // },
+
+        {
+          slot: 'QRcode',
+          label: '二维码',
+          align: 'center',
+          minWidth: 110
+        },
 
-          ...opt[this.activeName],
-          {
-            prop: 'createTime',
-            label: '创建时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            slot: 'status',
-            label: '状态',
-            align: 'center',
-            formatter: (row) => {
-              const obj = this.statusOpt[this.activeName].find(
-                (i) => i.value == row.status
-              );
-              return obj && obj.label;
-            }
-          },
+        {
+          prop: 'productionPlanCode',
+          label: '计划编号',
+          align: 'center',
+          minWidth: 110
+        },
+        {
+          prop: 'planType',
+          label: '计划类型',
+          align: 'center',
+          formatter: (row) => {
+            const obj = this.planType.find((i) => i.value == row.planType);
+            return obj && obj.label;
+          }
+        },
+        {
+          prop: 'produceRoutingName',
+          label: '工艺路线',
+          align: 'center'
+        },
+        {
+          prop: 'productCode',
+          label: '编码',
+          align: 'center'
+        },
+        {
+          prop: 'productName',
+          label: '名称',
+          align: 'center'
+        },
+        {
+          prop: 'brandNo',
+          label: '牌号',
+          align: 'center'
+        },
+        {
+          prop: 'model',
+          label: '型号',
+          align: 'center'
+        },
 
-          {
-            prop: 'teamName',
-            label: '班组',
-            align: 'center',
-            showOverflowTooltip: true
+        {
+          prop: 'priority',
+          label: '优先级',
+          align: 'center',
+          minWidth: 120,
+          slot: 'priority',
+          sortable: 'custom'
+        },
+
+        {
+          prop: 'formingNum',
+          label: '要求生产数量',
+          align: 'center',
+          slot: 'formingNum',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'formingWeight',
+          label: '要求生产重量',
+          slot: 'formingWeight',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'formedNum',
+          label: '已生产数量',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'formedWeight',
+          label: '已生产重量',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'planStartTime',
+          label: '计划开始时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'planCompleteTime',
+          label: '计划结束时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          prop: 'startTime',
+          label: '实际开始时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+
+        ...opt[this.activeName],
+        {
+          prop: 'createTime',
+          label: '创建时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          slot: 'status',
+          label: '状态',
+          align: 'center',
+          formatter: (row) => {
+            const obj = this.statusOpt[this.activeName].find(
+              (i) => i.value == row.status
+            );
+            return obj && obj.label;
           }
-        ];
-      },
+        },
 
-      clientEnvironmentId() {
-        return this.$store.state.user.info.clientEnvironmentId;
-      }
+        {
+          prop: 'teamName',
+          label: '班组',
+          align: 'center',
+          showOverflowTooltip: true
+        }
+      ];
     },
-    created() {
-      this.getFieldModel();
+
+    clientEnvironmentId() {
+      return this.$store.state.user.info.clientEnvironmentId;
+    }
+  },
+  created() {
+    this.getFieldModel();
+  },
+  methods: {
+    // 查看序列号
+    toView(row) {
+      this.$refs.xlhRef.open(row)
     },
-    methods: {
-      // 查看序列号
-      toView(row){
-        this.$refs.xlhRef.open(row)
-      },
 
 
-      handlePicking() {
-        this.$router.push({
-          path: '/produceOrder/picking'
-        });
-      },
-      statusFormatter(status) {
-        const obj = this.statusOpt[this.activeName].find(
-          (i) => i.value == status
-        );
+    handlePicking() {
+      this.$router.push({
+        path: '/produceOrder/picking'
+      });
+    },
+    statusFormatter(status) {
+      const obj = this.statusOpt[this.activeName].find(
+        (i) => i.value == status
+      );
 
-        return obj && obj.label;
-      },
+      return obj && obj.label;
+    },
 
-      routing(row){
-        this.id = row.id
+    routing(row) {
+      this.id = row.id
 
-        this.$refs.equipmentRef.open()
-      },
+      this.$refs.equipmentRef.open()
+    },
 
-      /* 表格数据源 */
-      async datasource({ page, limit, where, order }) {
-        let res = await getPage({
-          ...where,
-          ...order,
-          pageNum: page,
-          size: limit,
-          ...this.sort
-        });
-        // res['list'] = this.flattenArray(res.list)
-        return res;
-      },
+    /* 表格数据源 */
+    async datasource({ page, limit, where, order }) {
+      let res = await getPage({
+        ...where,
+        ...order,
+        pageNum: page,
+        size: limit,
+        ...this.sort
+      });
+      // res['list'] = this.flattenArray(res.list)
+      return res;
+    },
 
-      onSortChange(e) {
-        let sort = {
-          orderBy: e.order,
-          sortName: e.prop
-        };
-        this.sort = sort;
-        this.reload();
-      },
-      flattenArray(arr) {
-        var result = []; // 存放结果的数组
-        for (let i = 0; i < arr.length; i++) {
-          if (Array.isArray(arr[i].subWorkOrder)) {
-            let _arr = [];
-            _arr = _arr.concat(arr[i].subWorkOrder);
-            delete arr[i].subWorkOrder;
-            result.push(arr[i]);
-            result.push(..._arr);
-          } else {
-            result.push(arr[i]);
-          }
+    onSortChange(e) {
+      let sort = {
+        orderBy: e.order,
+        sortName: e.prop
+      };
+      this.sort = sort;
+      this.reload();
+    },
+    flattenArray(arr) {
+      var result = []; // 存放结果的数组
+      for (let i = 0; i < arr.length; i++) {
+        if (Array.isArray(arr[i].subWorkOrder)) {
+          let _arr = [];
+          _arr = _arr.concat(arr[i].subWorkOrder);
+          delete arr[i].subWorkOrder;
+          result.push(arr[i]);
+          result.push(..._arr);
+        } else {
+          result.push(arr[i]);
         }
+      }
 
-        return result;
-      },
+      return result;
+    },
 
-      /* 数据转为树形结构 */
-      parseData(data) {
+    /* 数据转为树形结构 */
+    parseData(data) {
 
-        return {
-          ...data,
-          list: this.$util.toTreeData({
-            data: data.list,
-            count: data.total,
+      return {
+        ...data,
+        list: this.$util.toTreeData({
+          data: data.list,
+          count: data.total,
+
+          idField: 'code',
+          parentIdField: 'originalCode'
+        })
+      };
+    },
 
-            idField: 'code',
-            parentIdField: 'originalCode'
-          })
-        };
-      },
+    /* 数据转为树形结构 */
 
-      /* 数据转为树形结构 */
+    createSuccess() {
+      this.reload();
+    },
+    handleCreate() {
+      this.$refs.createRef.open(0);
+    },
+    // 发布工单
+    handleOrderPublish(type, row) {
+      this.$router.push({
+        path: '/produce',
+        query: {
+          workOrderId: row.id
+        }
+      });
+    },
 
-      createSuccess() {
-        this.reload();
-      },
-      handleCreate() {
-        this.$refs.createRef.open(0);
-      },
-      // 发布工单
-      handleOrderPublish(type, row) {
-        this.$router.push({
-          path: '/produce',
-          query: {
-            workOrderId: row.id
+    getFieldModel() {
+      fieldModel({ fieldModel: 't_main_category' }).then((res) => {
+        const privateColumn = [
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 250,
+            align: 'center',
+            resizable: false,
+            fixed: 'right',
+            slot: 'action',
+            showOverflowTooltip: true
           }
-        });
-      },
+        ];
 
-      getFieldModel() {
-        fieldModel({ fieldModel: 't_main_category' }).then((res) => {
-          const privateColumn = [
-            {
-              columnKey: 'action',
-              label: '操作',
-              width: 250,
-              align: 'center',
-              resizable: false,
-              fixed: 'right',
-              slot: 'action',
-              showOverflowTooltip: true
-            }
-          ];
-
-          let newRes = res.map((m) => {
-            return {
-              prop: 'extField.' + m.prop,
-              label: m.label,
-              align: 'center',
-              showOverflowTooltip: true
-            };
-          });
-
-          this.newColumns = [...this.columns, ...newRes, ...privateColumn];
-
-          this.$forceUpdate();
+        let newRes = res.map((m) => {
+          return {
+            prop: 'extField.' + m.prop,
+            label: m.label,
+            align: 'center',
+            showOverflowTooltip: true
+          };
         });
-      },
 
-      // 完结与批量完结
-      toEnd(row) {
-        if (row) {
-          this.$confirm(`是否要完结工单【${row.code}】?`, '提醒', {
-            confirmButtonText: '确认',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              batchCompletion([row.id]).then((res) => {
-                this.$message.success('成功');
-                this.reload();
-              });
-            })
-            .catch(() => {});
-        } else {
-          if (!this.selection.length) {
-            return this.$message.warning('请至少选择一条工单!');
-          }
-          const ids = [];
-          this.selection.map((item) => {
-            ids.push(item.id);
-          });
-          const h = this.$createElement;
-          this.$msgbox({
-            title: '提醒',
-            message: h('p', null, [
-              h('span', null, '是否要完结 '),
-              h(
-                'span',
-                { style: 'color: #70B603' },
-                `${this.selection.length}`
-              ),
-              h('span', null, ' 条工单?')
-            ]),
-            showCancelButton: true,
-            confirmButtonText: '确认',
-            cancelButtonText: '取消',
-            type: 'warning'
+        this.newColumns = [...this.columns, ...newRes, ...privateColumn];
+
+        this.$forceUpdate();
+      });
+    },
+
+    // 完结与批量完结
+    toEnd(row) {
+      if (row) {
+        this.$confirm(`是否要完结工单【${row.code}】?`, '提醒', {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {
+            batchCompletion([row.id]).then((res) => {
+              this.$message.success('成功');
+              this.reload();
+            });
           })
-            .then(() => {
-              batchCompletion(ids).then((res) => {
-                this.$message.success('成功');
-                this.reload();
-              });
-            })
-            .catch(() => {});
+          .catch(() => { });
+      } else {
+        if (!this.selection.length) {
+          return this.$message.warning('请至少选择一条工单!');
         }
-      },
-
-      // 取消完结
-      toCancel(row) {
-        cancelCompletion([row.id]).then((res) => {
-          this.$message.success('成功');
-          this.reload();
+        const ids = [];
+        this.selection.map((item) => {
+          ids.push(item.id);
         });
-      },
+        const h = this.$createElement;
+        this.$msgbox({
+          title: '提醒',
+          message: h('p', null, [
+            h('span', null, '是否要完结 '),
+            h(
+              'span',
+              { style: 'color: #70B603' },
+              `${this.selection.length}`
+            ),
+            h('span', null, ' 条工单?')
+          ]),
+          showCancelButton: true,
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {
+            batchCompletion(ids).then((res) => {
+              this.$message.success('成功');
+              this.reload();
+            });
+          })
+          .catch(() => { });
+      }
+    },
 
-      // 拆分
-      toUnpack(row) {
-        this.$refs.unpackRef.open(row);
-      },
-      handleTabChange() {
-        this.$refs.searchRef.reset();
-      },
+    // 取消完结
+    toCancel(row) {
+      cancelCompletion([row.id]).then((res) => {
+        this.$message.success('成功');
+        this.reload();
+      });
+    },
 
-      /* 刷新表格 */
-      reload(where = {}) {
-        this.$nextTick(() => {
-          where.statusList = (
-            where.status || this.statusOpt[this.activeName][0].value
-          ).split(',');
-          this.$refs.table.reload({ page: 1, where });
-        });
-      },
+    // 拆分
+    toUnpack(row) {
+      this.$refs.unpackRef.open(row);
+    },
+    handleTabChange() {
+      this.$refs.searchRef.reset();
+    },
 
-      // 生产工单跳转
-      goDetail(row) {
-        this.$refs.detailsRef.open(row)
-      },
-      handleDelete({ id }) {
-        this.$confirm('确定删除当前数据?', '提示').then(async () => {
-          await del(id);
-          this.$message.success('删除成功!');
-          this.reload();
-        });
-      },
+    /* 刷新表格 */
+    reload(where = {}) {
+      this.$nextTick(() => {
+        where.statusList = (
+          where.status || this.statusOpt[this.activeName][0].value
+        ).split(',');
+        this.$refs.table.reload({ page: 1, where });
+      });
+    },
 
-      handleQRcode(row) {
-        if (this.clientEnvironmentId == 2) {
-          this.$refs.printSrRef.open([row.id]);
-        } else if (this.clientEnvironmentId == 3) {
-          this.$refs.printTgRef.open([row.id]);
-        } else {
-          this.$refs.printRef.open([row.id]);
-        }
-      },
+    // 生产工单跳转
+    goDetail(row) {
+      this.$refs.detailsRef.open(row)
+    },
+    handleDelete({ id }) {
+      this.$confirm('确定删除当前数据?', '提示').then(async () => {
+        await del(id);
+        this.$message.success('删除成功!');
+        this.reload();
+      });
+    },
 
-      allPrinting() {
-        let ids = this.findAllIds(this.selection);
+    handleQRcode(row) {
+      if (this.clientEnvironmentId == 2) {
+        this.$refs.printSrRef.open([row.id]);
+      } else if (this.clientEnvironmentId == 3) {
+        this.$refs.printTgRef.open([row.id]);
+      } else {
+        this.$refs.printRef.open([row.id]);
+      }
+    },
 
-        if (this.clientEnvironmentId == 2) {
-          this.$refs.printSrRef.open(ids);
-        } else if (this.clientEnvironmentId == 3) {
-          this.$refs.printTgRef.open(ids);
-        } else {
-          this.$refs.printRef.open(ids);
-        }
-      },
+    allPrinting() {
+      let ids = this.findAllIds(this.selection);
 
-      findAllIds(nodes) {
-        let ids = [];
-        nodes.forEach((node) => {
-          ids.push(node.id); // 添加当前节点的id
-          if (node.children && node.children.length > 0) {
-            // 递归调用自身来处理子节点
-            ids = ids.concat(this.findAllIds(node.children));
-          }
-        });
-        return ids;
-      },
+      if (this.clientEnvironmentId == 2) {
+        this.$refs.printSrRef.open(ids);
+      } else if (this.clientEnvironmentId == 3) {
+        this.$refs.printTgRef.open(ids);
+      } else {
+        this.$refs.printRef.open(ids);
+      }
+    },
 
-      choose(row) {
-       this.updateFn(row);
-      },
+    findAllIds(nodes) {
+      let ids = [];
+      nodes.forEach((node) => {
+        ids.push(node.id); // 添加当前节点的id
+        if (node.children && node.children.length > 0) {
+          // 递归调用自身来处理子节点
+          ids = ids.concat(this.findAllIds(node.children));
+        }
+      });
+      return ids;
+    },
 
-      async updateFn(row){
-        let req = {
-          id:this.id,	//工艺路线id		false	
-          produceRoutingId:row[0].id,	//工艺路线id		false	
-          produceRoutingName:row[0].name,
+    choose(row) {
+      this.updateFn(row);
+    },
 
-        };
-        const res = await update(req);
-        this.reload();
-      },
+    async updateFn(row) {
+      let req = {
+        id: this.id,	//工艺路线id		false	
+        produceRoutingId: row[0].id,	//工艺路线id		false	
+        produceRoutingName: row[0].name,
 
-      sortTop(row) {
-        row.priority = Number(row.priority) + 1;
-        this.priorityChange(row);
-      },
-      sortBottom(row) {
-        if (row.priority <= 1) {
-          return;
-        }
-        row.priority = Number(row.priority) - 1;
-        this.priorityChange(row);
-      },
+      };
+      const res = await update(req);
+      this.reload();
+    },
 
-      priorityChange(row) {
-        if (row.priority > 10) {
-          row.priority = 10; // 如果大于 10,则设置为 10
-        } else if (row.priority < 0) {
-          row.priority = 0; // 如果小于 0,则设置为 0
-        }
+    sortTop(row) {
+      row.priority = Number(row.priority) + 1;
+      this.priorityChange(row);
+    },
+    sortBottom(row) {
+      if (row.priority <= 1) {
+        return;
+      }
+      row.priority = Number(row.priority) - 1;
+      this.priorityChange(row);
+    },
 
-        this.priorityFn(row);
-      },
-      priorityFn: debounce(function (row) {
-        let params = {
-          id: row.id,
-          priority: row.priority
-        };
-        updatePriority(params).then((res) => {});
-      }, 800)
-    }
-  };
+    priorityChange(row) {
+      if (row.priority > 10) {
+        row.priority = 10; // 如果大于 10,则设置为 10
+      } else if (row.priority < 0) {
+        row.priority = 0; // 如果小于 0,则设置为 0
+      }
+
+      this.priorityFn(row);
+    },
+    priorityFn: debounce(function (row) {
+      let params = {
+        id: row.id,
+        priority: row.priority
+      };
+      updatePriority(params).then((res) => { });
+    }, 800)
+  }
+};
 </script>