Procházet zdrojové kódy

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-mes into dengfei

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

+ 8 - 8
src/views/batchRecord/components/programRulesDialog.vue

@@ -72,7 +72,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="8">
-          <el-form-item label="类型" prop="autoOrder">
+          <el-form-item label="类型" prop="type">
             <el-select
               v-model="addForm.type"
               size="small"
@@ -84,7 +84,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="8" v-if="addForm.autoOrder && addForm.type == 1">
+        <el-col :span="8" v-if="((addForm.autoOrder && addForm.status == 4) || (!addForm.autoOrder && addForm.status == 0)) && addForm.type == 1">
           <el-form-item label="班组" prop="teamId">
             <el-select
               v-model="addForm.teamId"
@@ -101,7 +101,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="8" v-if="addForm.autoOrder && addForm.type == 0">
+        <el-col :span="8" v-if="((addForm.autoOrder && addForm.status == 4) || (!addForm.autoOrder && addForm.status == 0)) && addForm.type == 0">
           <el-form-item label="部门" prop="groupId">
             <deptSelect
               v-model="addForm.groupId"
@@ -109,7 +109,7 @@
             />
           </el-form-item>
         </el-col>
-        <el-col :span="8" v-if="addForm.autoOrder && addForm.type == 0">
+        <el-col :span="8" v-if="((addForm.autoOrder && addForm.status == 4) || (!addForm.autoOrder && addForm.status == 0)) && addForm.type == 0">
           <el-form-item label="负责人" prop="executeIdList">
             <el-select
               v-model="addForm.executeIdList"
@@ -882,10 +882,10 @@
           this.addForm.teamId = this.addForm.executeUser[0]?.teamId || '';
         }
 
-        if (this.type === 'dispatch') {
-          // 自动派单
-          this.addForm.autoOrder = 1;
-        }
+        // if (this.type === 'dispatch') {
+        //   // 自动派单
+        //   this.addForm.autoOrder = 1;
+        // }
 
         this.loading = false;
 

+ 1 - 1
src/views/batchRecord/components/tables/deviceBatchRecordTable.vue

@@ -87,7 +87,7 @@
             minWidth: 150
           },
           {
-            prop: 'finishTime',
+            prop: 'reportTime',
             label: '报工时间',
             align: 'center',
             showOverflowTooltip: true,

+ 1 - 0
src/views/produce/components/prenatalExamination/PlanRulesEventDialog.vue

@@ -36,6 +36,7 @@
         "
         :workOrderId="currentPlans.matchedRecords[0].id"
         :workOrderInfo="workOrderInfo"
+        :planInfo="rulesInfo"
       ></workOrderDetails>
     </div>
 

+ 3 - 3
src/views/produce/components/prenatalExamination/components/workOrder/programRulesEventDialog.vue

@@ -75,7 +75,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="8" v-if="addForm.autoOrder && addForm.type == 1">
+        <el-col :span="8" v-if="((addForm.autoOrder && addForm.status == 4) || (!addForm.autoOrder && addForm.status == 0)) && addForm.type == 1">
           <el-form-item label="班组" prop="teamId">
             <el-select
               v-model="addForm.teamId"
@@ -92,7 +92,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="8" v-if="addForm.autoOrder && addForm.type == 0">
+        <el-col :span="8" v-if="((addForm.autoOrder && addForm.status == 4) || (!addForm.autoOrder && addForm.status == 0)) && addForm.type == 0">
           <el-form-item label="部门" prop="groupId">
             <deptSelect
               v-model="addForm.groupId"
@@ -100,7 +100,7 @@
             />
           </el-form-item>
         </el-col>
-        <el-col :span="8" v-if="addForm.autoOrder && addForm.type == 0">
+        <el-col :span="8" v-if="((addForm.autoOrder && addForm.status == 4) || (!addForm.autoOrder && addForm.status == 0)) && addForm.type == 0">
           <el-form-item label="负责人" prop="executeIdList">
             <el-select
               v-model="addForm.executeIdList"

+ 9 - 0
src/views/produce/components/prenatalExamination/components/workOrder/workOrderEvent.vue

@@ -339,6 +339,11 @@
         type: Object,
         default: () => {}
       },
+      // 计划信息
+      planInfo: {
+        type: Object,
+        default: () => {}
+      },
     },
     components: {
       toolModal,
@@ -784,6 +789,10 @@
             body.specification = this.workOrderInfo.specification;
             body.productModel = this.workOrderInfo.model;
             body.formingNum = this.workOrderInfo.formingNum;
+            body.produceTaskId = this.planInfo.produceTaskId;
+            body.produceTaskConfigId = this.planInfo.produceTaskConfigId;
+
+            console.log('body~~', body);
 
             this.butLoading = true;
 

+ 6 - 5
src/views/produce/components/prenatalExamination/index.vue

@@ -271,6 +271,12 @@
           if(item.executeMethod == 1) {
             // planRulesEventDialogRef
 
+            // // 是否有计划
+            if(!item.plans || item.plans.length == 0) {
+              this.$message.error('未生成记录计划');
+              return;
+            }
+
             item.plans.forEach(plan => {
               // 找到records数组中planid与当前plan.id匹配的记录
               plan.matchedRecords = item.records.filter(record => record.planId == plan.id);
@@ -280,11 +286,6 @@
 
             return
 
-            // // 是否有计划
-            // if(!item.plans || item.plans.length == 0) {
-            //   this.$message.error('未生成记录计划');
-            //   return;
-            // }
             // // 有计划无工单  派单
             // if(item.plans && item.plans.length > 0 && (!item.records || item.records.length == 0)) {
             //   this.$refs.programRulesDialogRef.open('dispatch', item.plans[0], item.plans);

+ 2 - 1
src/views/sample/components/equipmentDialog.vue

@@ -156,7 +156,8 @@
           pageNum: page,
           size: limit,
           categoryLevelId: this.categoryLevelId,
-          isProduct: true
+          isProduct: true,
+          isEnable: 1
         };
         const data = await getList(params);
         this.tableList = data.list;

+ 2 - 1
src/views/unacceptedProduct/components/EquipmentDialog.vue

@@ -179,7 +179,8 @@
           pageNum: page,
           size: limit,
           categoryLevelId: this.categoryLevelId,
-          isProduct: true
+          isProduct: true,
+          isEnable: 1
         };
         const data = await getList(params);
         this.tableList = data.list;