Răsfoiți Sursa

feat: 启用场站筛选功能

yusheng 1 lună în urmă
părinte
comite
9b6d415ba1

+ 8 - 8
src/views/recordComponents/plan.vue

@@ -153,7 +153,7 @@
             minWidth: 110
             minWidth: 110
           },
           },
           {
           {
-            prop: 'postName',
+            prop: 'productLineName',
             label: '场站名称',
             label: '场站名称',
             align: 'center',
             align: 'center',
             showOverflowTooltip: true,
             showOverflowTooltip: true,
@@ -282,13 +282,13 @@
             width: '280px',
             width: '280px',
             placeholder: '计划单号,计划名称,记录规则名称'
             placeholder: '计划单号,计划名称,记录规则名称'
           },
           },
-          // {
-          //   label: '场站',
-          //   value: '',
-          //   type: 'select',
-          //   planList: this.productLineList,
-          //   placeholder: '请选择'
-          // },
+          {
+            label: '场站',
+            value: '',
+            type: 'select',
+            planList: this.productLineList,
+            placeholder: '请选择'
+          },
           {
           {
             label: '班组',
             label: '班组',
             value: 'teamId',
             value: 'teamId',

+ 22 - 22
src/views/recordComponents/programRulesDialog.vue

@@ -104,15 +104,15 @@
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
         <el-col :span="8">
         <el-col :span="8">
-          <el-form-item label="场站" prop="postName">
-            <el-input
+          <el-form-item label="场站" prop="productLineId">
+            <!-- <el-input
               v-model="addForm.postName"
               v-model="addForm.postName"
               size="small"
               size="small"
               placeholder="自动带出"
               placeholder="自动带出"
               disabled
               disabled
             >
             >
-            </el-input>
-            <!-- <el-select
+            </el-input> -->
+            <el-select
               v-model="addForm.productLineId"
               v-model="addForm.productLineId"
               placeholder="请选择场站"
               placeholder="请选择场站"
               filterable
               filterable
@@ -126,7 +126,7 @@
                 @click.native="addForm.productLineName = item.name"
                 @click.native="addForm.productLineName = item.name"
               >
               >
               </el-option>
               </el-option>
-            </el-select> -->
+            </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
         <el-col :span="8" v-if="dispatchStatus && addForm.type == 0">
         <el-col :span="8" v-if="dispatchStatus && addForm.type == 0">
@@ -1140,8 +1140,8 @@
         this.addForm.teamId = '';
         this.addForm.teamId = '';
         this.addForm.teamName = '';
         this.addForm.teamName = '';
         this.addForm.executeIdList = [];
         this.addForm.executeIdList = [];
-        // this.addForm.productLineName = '';
-        // this.addForm.productLineId = '';
+        this.addForm.productLineName = '';
+        this.addForm.productLineId = '';
         this.productLineList = [];
         this.productLineList = [];
       },
       },
       //选择部门(搜索)
       //选择部门(搜索)
@@ -1541,21 +1541,21 @@
           (item) => item.id === this.addForm.teamId
           (item) => item.id === this.addForm.teamId
         );
         );
         this.addForm.teamName = currentTeam.name;
         this.addForm.teamName = currentTeam.name;
-        // if (!init) {
-        //   this.addForm.productLineName = '';
-        //   this.addForm.productLineId = '';
-        // }
-        // this.productLineList = [];
-        // currentTeam.factoryWorkstationVOList.forEach((item) => {
-        //   if (
-        //     !this.productLineList.find((p) => p.id === item.productionLineId)
-        //   ) {
-        //     this.productLineList.push({
-        //       name: item.productionLineName,
-        //       id: item.productionLineId
-        //     });
-        //   }
-        // });
+        if (!init) {
+          this.addForm.productLineName = '';
+          this.addForm.productLineId = '';
+        }
+        this.productLineList = [];
+        currentTeam.factoryWorkstationVOList.forEach((item) => {
+          if (
+            !this.productLineList.find((p) => p.id === item.productionLineId)
+          ) {
+            this.productLineList.push({
+              name: item.productionLineName,
+              id: item.productionLineId
+            });
+          }
+        });
 
 
         // if (currentTeam) {
         // if (currentTeam) {
         //   // 同步执行人
         //   // 同步执行人

+ 8 - 8
src/views/recordComponents/workOrder.vue

@@ -121,7 +121,7 @@
             minWidth: 110
             minWidth: 110
           },
           },
           {
           {
-            prop: 'postName',
+            prop: 'productLineName',
             label: '场站名称',
             label: '场站名称',
             align: 'center',
             align: 'center',
             showOverflowTooltip: true,
             showOverflowTooltip: true,
@@ -255,13 +255,13 @@
             width: '280px',
             width: '280px',
             placeholder: '工单单号,计划单号,记录规则名称'
             placeholder: '工单单号,计划单号,记录规则名称'
           },
           },
-          // {
-          //   label: '场站',
-          //   value: 'productLineId',
-          //   type: 'select',
-          //   planList: this.productLineList,
-          //   placeholder: '请选择'
-          // },
+          {
+            label: '场站',
+            value: 'productLineId',
+            type: 'select',
+            planList: this.productLineList,
+            placeholder: '请选择'
+          },
           {
           {
             label: '班组',
             label: '班组',
             value: 'teamId',
             value: 'teamId',

+ 16 - 8
src/views/recordComponents/workOrderReport.vue

@@ -142,12 +142,20 @@
         </el-col>
         </el-col>
         <el-col :span="8">
         <el-col :span="8">
           <el-form-item label="场站" prop="postName">
           <el-form-item label="场站" prop="postName">
-            <el-input
-              clearable
-              v-model="addForm.postName"
-              placeholder=" "
-              disabled
-            />
+            <el-select
+              v-model="addForm.productLineId"
+              placeholder="请选择场站"
+              filterable
+            >
+              <el-option
+                v-for="item in productLineList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+                @click.native="addForm.productLineName = item.name"
+              >
+              </el-option>
+            </el-select>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
         <el-col :span="8" v-if="pageName == 'steamInjectionInspectionRecord'">
         <el-col :span="8" v-if="pageName == 'steamInjectionInspectionRecord'">
@@ -410,8 +418,8 @@
         contactId: '',
         contactId: '',
         supplierId: '',
         supplierId: '',
         supplierName: '',
         supplierName: '',
-        postId: null,
-        postName: ''
+        productLineId: null,
+        productLineName: ''
       };
       };
 
 
       return {
       return {