695593266@qq.com 10 месяцев назад
Родитель
Сommit
468787bac5

+ 9 - 0
src/api/unacceptedProduct/index.js

@@ -221,3 +221,12 @@ export async function getKeepsampleList(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+//获取回流工序
+export async function refluxTask(data) {
+  const res = await request.post('/mes/workorder/refluxTask', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 7 - 7
src/views/produce/components/workPlan/index.vue

@@ -498,13 +498,13 @@
       },
 
       async openEdit(type, row) {
-        if (type == 'edit') {
-          const code = await verificationQualityInspector(row.id);
-          if (code == '-1') {
-            console.log('不是报工人');
-            return;
-          }
-        }
+        // if (type == 'edit') {
+        //   const code = await verificationQualityInspector(row.id);
+        //   if (code == '-1') {
+        //     console.log('不是报工人');
+        //     return;
+        //   }
+        // }
 
         const req = {
           workOrderId: row.id,

+ 45 - 4
src/views/unacceptedProduct/detail.vue

@@ -64,6 +64,7 @@
 
     <el-dialog
       :visible.sync="dialogVisible"
+      v-if="dialogVisible"
       width="35%"
       @close="close"
       title="处置"
@@ -90,6 +91,25 @@
           </el-select>
         </el-form-item>
 
+        <template
+          v-if="disposeForm.disposeType == 1 || disposeForm.disposeType == 2"
+        >
+          <el-form-item label="回流工序" prop="taskId" align="center">
+            <el-select
+              style="width: 100%"
+              v-model="disposeForm.taskId"
+              clearable
+            >
+              <el-option
+                v-for="item in refluxTaskList"
+                :key="item.taskId"
+                :value="item.taskId"
+                :label="item.taskTypeName"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </template>
+
         <template v-if="disposeForm.disposeType == 6">
           <el-row>
             <el-col :span="24">
@@ -217,7 +237,7 @@
   import dictMixins from '@/mixins/dictMixins';
   import { unacceptedProductStatus } from '@/utils/util';
   import { deepClone } from '@/utils';
-  import { disposeApi } from '@/api/unacceptedProduct';
+  import { disposeApi, refluxTask } from '@/api/unacceptedProduct';
 
   import {
     getDetail,
@@ -252,7 +272,8 @@
           sampleRemark: '',
           producerManufacturer: '',
           depotId: '',
-          depotName: ''
+          depotName: '',
+          taskId: ''
         },
         loading: false,
         selection: [],
@@ -318,7 +339,8 @@
             value: 8,
             label: '回用'
           }
-        ]
+        ],
+        refluxTaskList: []
       };
     },
     computed: {
@@ -524,6 +546,7 @@
     async created() {
       this.qualityType = this.$route.query.qualityType;
       this.warehouseList = await getWarehouseLists();
+      this.getRefluxTask();
       // console.log(this.warehouseList, 'this.warehouseList');
     },
 
@@ -535,6 +558,15 @@
         // where.unqualifiedProductsId = this.$route.query.id;
         return arr.poList;
       },
+
+      async getRefluxTask() {
+        await refluxTask({
+          workOrderCode: this.$route.query.workOrderCode
+        }).then((res) => {
+          this.refluxTaskList = res;
+        });
+      },
+
       reload(where) {
         this.key = Math.random();
         // this.$nextTick(() => {
@@ -573,7 +605,8 @@
           if (valid) {
             let params = {
               disposeType: this.disposeForm.disposeType,
-              poList: []
+              poList: [],
+              refluxTask: {}
             };
             if (this.all) {
               params.poList = this.selection.map((item) => {
@@ -584,6 +617,13 @@
                 { ...deepClone(this.current), ...this.disposeForm }
               ];
             }
+
+            if (this.disposeForm.taskId) {
+              params.refluxTask = this.refluxTaskList.find(
+                (item) => item.taskId == this.disposeForm.taskId
+              );
+            }
+
             console.log(params);
             await disposeApi(params);
             this.dialogVisible = false;
@@ -641,6 +681,7 @@
           this.disposeForm.producerManufacturer = '';
           this.disposeForm.depotId = '';
           this.disposeForm.depotName = '';
+          this.disposeForm.taskId = '';
         }
       }
     }

+ 8 - 0
src/views/unacceptedProduct/index.vue

@@ -175,6 +175,13 @@
             width: 100,
             showOverflowTooltip: true
           },
+          {
+            prop: 'workOrderCode',
+            label: '工单编号',
+            align: 'center',
+            width: 100,
+            showOverflowTooltip: true
+          },
           // {
           //   prop: 'produceRoutingName',
           //   label: '工艺路线',
@@ -245,6 +252,7 @@
           query: {
             id: row.id,
             qualityType: row.qualityType,
+            workOrderCode: row.workOrderCode,
             type
           }
         });