Procházet zdrojové kódy

工艺路线新增搜索条件

695593266@qq.com před 9 měsíci
rodič
revize
ae777a4cbb

+ 6 - 10
src/views/factoryModel/station/components/edit.vue

@@ -425,7 +425,7 @@
             assetName: '', //设备名称
             meterMeasuringUnit: '', // 节拍计量单位
             workCenterId: null, //所属工作中心
-            produceId: null, //可执行工序
+            // produceId: null, //可执行工序
             type: null,
             teamId: null
           },
@@ -669,8 +669,7 @@
           pageNum: 1,
           size: 999,
           type: 1,
-        enable:1
-
+          enable: 1
         });
         this.factoryList = list || [];
       },
@@ -814,8 +813,7 @@
           type: 2,
           parentId: this.form.extInfo.factoryId,
           size: 9999,
-        enable:1
-
+          enable: 1
         };
         getFactoryarea(par).then((res) => {
           this.workshopPlanList = res.list;
@@ -849,7 +847,7 @@
       change_productionLineId() {},
       // 请求详情
       getData(id) {
-       return getById(id).then((res) => {
+        return getById(id).then((res) => {
           if (
             res.workstationSubstanceList &&
             res.workstationSubstanceList.length > 0
@@ -862,15 +860,13 @@
             // }
           }
           this.form = Object.assign({}, this.form, res);
-          if(this.form?.extInfo?.teamId){
-           
-            this.userListFn(this.form.extInfo.teamId)
+          if (this.form?.extInfo?.teamId) {
+            this.userListFn(this.form.extInfo.teamId);
           }
 
           if (res.taskList?.length) {
             this.form.taskNames = res.taskList.map((i) => i.name);
           }
-
         });
       }
     }

+ 32 - 3
src/views/technology/route/components/production/components/user-search.vue

@@ -36,6 +36,25 @@
           </el-select>
         </el-form-item>
       </el-col>
+
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 6 }">
+        <el-form-item label="工作中心:">
+          <el-select
+            v-model="where.workCenterId"
+            placeholder="请选择"
+            filterable
+            clearable
+          >
+            <el-option
+              v-for="item in workCenterList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-col>
       <!-- <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="性别:">
           <el-select
@@ -50,7 +69,7 @@
         </el-form-item>
       </el-col> -->
 
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 4, md: 8 } : { span: 4 }">
         <div class="ele-form-actions">
           <el-button
             type="primary"
@@ -69,6 +88,7 @@
 
 <script>
   import route from '@/api/technology/route';
+  import work from '@/api/technology/work';
   export default {
     props: {
       taskInfo: {
@@ -82,14 +102,16 @@
       const defaultWhere = {
         code: '',
         name: '',
-        factoriesId: ''
+        factoriesId: '',
+        workCenterId: ''
         // nickname: '',
         // sex: undefined
       };
       return {
         // 表单数据
         where: { ...defaultWhere },
-        factoryList: []
+        factoryList: [],
+        workCenterList: []
       };
     },
     computed: {
@@ -100,6 +122,7 @@
     },
     mounted() {
       this.getFactoryList();
+      this.getListWorkCenter();
       const data = this.deepCopy(this.taskInfo);
       this.where.factoriesId = data.factoryId;
       this.search();
@@ -140,6 +163,12 @@
           type: 1
         });
         this.factoryList = res.list;
+      },
+
+      async getListWorkCenter() {
+        await work.list({ pageNum: 1, size: -1 }).then((res) => {
+          this.workCenterList = res.list;
+        });
       }
     }
   };