Sfoglia il codice sorgente

修改量具送检流程以及采购退货出库显示问题

huang_an 2 anni fa
parent
commit
94628d5a9d

+ 2 - 1
src/utils/dict/warehouse.js

@@ -55,7 +55,8 @@ export const outputSceneState = [
   { code: 6, label: '外协出库' },
   { code: 7, label: '委外出库' },
   { code: 8, label: '受托退货出库' },
-  { code: 9, label: '仓库委外出库' }
+  { code: 9, label: '仓库委外出库' },
+  { code: 10, label: '采购退货出库' }
 ];
 // 紧急状态
 export const emergencyState = [

+ 62 - 9
src/views/bpm/handleTask/components/measuringToolInspection/detailDialog.vue

@@ -119,16 +119,41 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column
-                v-if="
-                  taskDefinitionKey === 'leader_check' &&
-                  infoData.logList.length == 1
-                "
-                label="质检"
-                prop="status"
-              >
+              <el-table-column label="是否遗失" prop="isLose">
                 <template slot-scope="scope">
-                  <el-select v-model="scope.row.status" placeholder="请选择">
+                  <el-select
+                    v-if="taskDefinitionKey === 'user_submit'"
+                    v-model="scope.row.isLose"
+                    placeholder="请选择"
+                  >
+                    <el-option
+                      v-for="item in option"
+                      :label="item.label"
+                      :value="item.value"
+                      :key="item.value"
+                    >
+                    </el-option>
+                  </el-select>
+                  <span v-else>{{
+                    scope.row.isLose != null
+                      ? option.filter(
+                          (item) => item.value == scope.row.isLose
+                        )[0].label
+                      : ''
+                  }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="质检" prop="qualityStatus">
+                <template slot-scope="scope">
+                  <el-select
+                    v-if="
+                      (taskDefinitionKey === 'leader_check' &&
+                        infoData.logList.length == 1) ||
+                      taskDefinitionKey === 'user_receive'
+                    "
+                    v-model="scope.row.qualityStatus"
+                    placeholder="请选择"
+                  >
                     <el-option
                       v-for="item in statusOption"
                       :label="item.label"
@@ -137,6 +162,13 @@
                     >
                     </el-option>
                   </el-select>
+                  <span v-else>{{
+                    scope.row.qualityStatus != null
+                      ? statusOption.filter(
+                          (item) => item.value == scope.row.qualityStatus
+                        )[0].label
+                      : ''
+                  }}</span>
                 </template>
               </el-table-column>
             </el-table>
@@ -290,10 +322,21 @@
         infoData: {
           planDeviceList: [
             {
+              substance: {},
               workItems: []
             }
           ]
         },
+        option: [
+          {
+            value: 0,
+            label: '否'
+          },
+          {
+            value: 1,
+            label: '是'
+          }
+        ],
         statusOption: [
           {
             value: 0,
@@ -348,6 +391,16 @@
         console.log(res);
         data.logList = res.data;
         this.infoData = data;
+        if (this.taskDefinitionKey == 'leader_check') {
+          this.infoData.planDeviceList = this.infoData.planDeviceList.map(
+            (item) => {
+              return {
+                ...item,
+                qualityStatus: 0
+              };
+            }
+          );
+        }
         EventBus.$emit('getData', this.infoData);
       });
     },

+ 22 - 3
src/views/bpm/handleTask/components/measuringToolInspection/submit.vue

@@ -242,23 +242,42 @@
           isSubmit,
           planId: data.planId
         };
-        if (status === 33) {
+        if (status === 33 || status >= 50) {
           console.log(data.planDeviceList);
           let boolen = data.planDeviceList.every(
-            (item) => item.status !== null
+            (item) => item.qualityStatus !== null
           );
           console.log(boolen);
           if (boolen) {
             params.planDeviceToolsList = data.planDeviceList.map((item) => {
               return {
                 deviceId: item.deviceId,
-                qualityStatus: item.status
+                qualityStatus: item.qualityStatus,
+                isLose: item.isLose
               };
             });
           } else {
             this.$message.error('请完成质检');
             return false;
           }
+        } else if (status === 10) {
+          console.log(data.planDeviceList);
+          let boolen = data.planDeviceList.every(
+            (item) => item.isLose !== null
+          );
+          console.log(boolen);
+          if (boolen) {
+            params.planDeviceToolsList = data.planDeviceList.map((item) => {
+              return {
+                deviceId: item.deviceId,
+                qualityStatus: item.qualityStatus,
+                isLose: item.isLose
+              };
+            });
+          } else {
+            this.$message.error('设备是否遗失');
+            return false;
+          }
         }
         console.log(params);
         surrender(params).then(() => {

+ 1 - 1
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/purchaseReturnsOutboundShipments.vue

@@ -1016,7 +1016,7 @@
             // 未出库
             this.isStorage = false;
             this.formData.extInfo.assetType = row.categoryLevelTopId || '9';
-            this.formData.bizType = '3';
+            this.formData.bizType = '10';
             this.isTask = true;
             this.$refs.trees.valueTitle = '产品';
             this.title = '产品';