wsx 9 месяцев назад
Родитель
Сommit
3644cedb0a

+ 5 - 2
src/views/unqualifiedProduct/unqualifiedList/components/factoryAdd.vue

@@ -422,8 +422,11 @@
     watch: {
       factoryData: {
         handler(val) {
-          console.log(this.form);
-          this.form.productInfoList = val;
+          val.forEach((item, index) => {
+            // item.requiredFormingNum=item.measureQuantity
+            this.$set(item, 'requiredFormingNum', item.measureQuantity);
+          });
+          this.$set(this.form, 'productInfoList', val);
         },
         immediate: true
       }

+ 9 - 3
src/views/unqualifiedProduct/unqualifiedList/index.vue

@@ -22,7 +22,7 @@
           {{ getDictValue('质检计划类型', row.qualityType) }}
         </template>
         <template v-slot:createTime="{ row }">
-          <span :class="isRed(row.createTime)">{{ row.createTime }}</span>
+          <span :class="isRed(row)">{{ row.createTime }}</span>
         </template>
         <template v-slot:action="{ row }">
           <el-link
@@ -230,9 +230,10 @@
       },
 
       isRed() {
-        return (givenTimeStr) => {
+        return (row) => {
+          const { createTime, status } = row;
           // 解析给定的时间字符串
-          const givenTime = new Date(givenTimeStr);
+          const givenTime = new Date(createTime);
 
           // 检查时间是否有效
           if (isNaN(givenTime.getTime())) {
@@ -242,6 +243,11 @@
           }
           // 获取当前时间
           const now = new Date();
+    
+          // 处置完成,不标红
+          if (status == 2) {
+            return '';
+          }
 
           // 检查给定时间是否超过当前时间(超过当前时间的不算)
           if (givenTime > now) {

+ 26 - 2
src/views/unqualifiedProduct/unqualifiedList/rework/index.vue

@@ -130,8 +130,7 @@
             align: 'center',
             reserveSelection: true,
             selectable: (row, index) => {
-              return true;
-              return row.disposalStatus !== 2; //
+              return row.status == 0; //
             }
           },
           {
@@ -250,6 +249,31 @@
             label: '原因',
             align: 'center'
           },
+          {
+            prop: 'type',
+            label: '处理类型',
+            align: 'center',
+            width: 120,
+            formatter: (row, column, cellValue) => {
+              return cellValue == 1
+                ? '转生产计划'
+                : cellValue == 2
+                ? '转生产订单'
+                : cellValue == 3
+                ? '转生产工单'
+                : cellValue == 4
+                ? '回流'
+                : '';
+            }
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            formatter: (row, column, cellValue) => {
+              return cellValue == 0 ? '未处理' : cellValue == 1 ? '已处理' : '';
+            }
+          },
 
           {
             prop: 'createTime',