3 Revize 213b9021dd ... 81217212ac

Autor SHA1 Zpráva Datum
  xieyong 81217212ac fix(footBtn): 增加isSomeoneDisabled属性,禁用特定操作并提供提示信息 před 20 hodinami
  xieyong a6c2287ae1 fix(goodsDetail): 更新是否收货字段的显示逻辑,增加isReceiptDetail状态控制 před 21 hodinami
  xieyong e7597aec06 fix(goodsDetail): 增加是否收货字段的显示逻辑,并更新相关条件 před 23 hodinami

+ 20 - 5
src/views/beEntrusted/components/goodsDetail.vue

@@ -51,6 +51,10 @@
       <template v-slot:isTransferToProductionPlan="{ row }">
         <span>{{ row.isTransferToProductionPlan == 1 ? "已转生产计划" : "未转生产计划"}}</span>
       </template>
+
+      <template v-slot:isMeasuring="{ row }">
+        <span>{{ row.isMeasuring == 1 ? "是" : "否"}}</span>
+      </template>
     </ele-pro-table>
 
     <template v-slot:footer v-if="type != 'detail' && type != 'send'">
@@ -241,12 +245,20 @@
             align: 'center',
             showOverflowTooltip: true
           },
+          // {
+          //   prop: 'isTransferToProductionPlan',
+          //   slot: 'isTransferToProductionPlan',
+          //   label: '是否转生产计划',
+          //   align: 'center',
+          //   showOverflowTooltip: true
+          // }
           {
-            prop: 'isTransferToProductionPlan',
-            slot: 'isTransferToProductionPlan',
-            label: '是否转生产计划',
+            prop: 'isMeasuring',
+            slot: 'isMeasuring',
+            label: '是否收货',
             align: 'center',
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            show: this.type == 'add' ? true : false
           }
         ];
       }
@@ -271,9 +283,12 @@
         if(this.type === 'send') {
           obj.detailType = 3;
         }
-        if(this.type === 'detail'){
+        if(this.type === 'detail') {
           obj.detailType = 2;
         }
+        if(this.type === 'add') {
+          obj.status = 1;
+        }
         await pleaseEntrustGoodsDetail(obj).then((res) => {
           this.goodsList = [];
           res.data.forEach((item) => {

+ 18 - 0
src/views/entrust/components/goodsDetail.vue

@@ -56,6 +56,10 @@
           {{ getStatusInfo(row.status).label }}
         </el-tag>
       </template>
+
+       <template v-slot:isMeasuring="{ row }">
+        <span>{{ row.isMeasuring == 1 ? "是" : "否"}}</span>
+      </template>
     </ele-pro-table>
 
     <template v-slot:footer v-if="type != 'detail' && itemData.sendStatus != 4">
@@ -95,6 +99,7 @@
         id: '',
         title: '',
         type: '',
+        isReceiptDetail: true,
         itemData: {},
         loading: null,
         // 在制品发货状态:键为后端 status,值为 el-tag 显示配置
@@ -219,6 +224,14 @@
             minWidth: 110,
             showOverflowTooltip: true,
             show: this.type == 'detail' ? true : false
+          },
+          {
+            prop: 'isMeasuring',
+            slot: 'isMeasuring',
+            label: '是否收货',
+            align: 'center',
+            showOverflowTooltip: true,
+            show: this.type == 'receipt' && !this.isReceiptDetail ? true : false
           }
         ];
       }
@@ -236,6 +249,9 @@
         this.title = this.type != 'receipt' ? '发货单' : '收货单';
         this.itemData = item;
         this.id = item.id;
+        // 重置 isReceiptDetail:仅当 type 为 receipt 且传入了 detailType 时,才是收货操作(false)
+        // 其余情况(收货详情、发货、详情等)保持为 true
+        this.isReceiptDetail = !(type === 'receipt' && detailType);
         this.getDetail(item.id, detailType);
       },
 
@@ -256,6 +272,8 @@
 
         if(this.type === 'receipt' && type) {
           params.detailType = type;
+          params.status = 3;
+          // isReceiptDetail 在 open() 里已经重置,此处只处理 params
         }
 
         await pleaseEntrustGoodsDetail(params).then(async (res) => {

+ 20 - 0
src/views/produce/components/footBtn.vue

@@ -39,6 +39,15 @@
         type: String,
         default: ''
       },
+      // 当前工序已分配给他人(routeList 项 isSomeone 为 true)时禁用领料/投料/报工/委外请托
+      isSomeoneDisabled: {
+        type: Boolean,
+        default: false
+      },
+      isSomeoneDisabledMsg: {
+        type: String,
+        default: '无法操作'
+      },
       activeName: {
         type: String,
         default: '0'
@@ -388,6 +397,17 @@
                 '请先完成领料、投料后再进行首件两检'
             };
           }
+          // 当前工序已分配给他人时,禁用领料/投料/报工/委外请托
+          if (
+            this.isSomeoneDisabled &&
+            ['pick', 'feed', 'job', 'Outsourcing'].includes(i.type)
+          ) {
+            return {
+              ...i,
+              disable: true,
+              msg: this.isSomeoneDisabledMsg || '无法操作'
+            };
+          }
           if (this.isPreProductionResult) {
             for (let key in this.isPreProductionResult) {
               let obj = this.disableObj[key];

+ 5 - 0
src/views/produceOrder/workReport.vue

@@ -221,6 +221,8 @@
                 :singleReportInspection="singleReportInspection"
                 :qualityInspectionDisabled="qualityInspectionDisabled"
                 :qualityInspectionDisabledMsg="firstArticlePickFeedMsg"
+                :isSomeoneDisabled="isSomeoneDisabled"
+                :isSomeoneDisabledMsg="'无法操作'"
                 :activeName="activeName"
                 style="background: rgba(223, 250, 222, 0.6); padding: 10px"
               ></footBtn>
@@ -460,6 +462,9 @@
           !this.firstArticlePickFeedReady
         );
       },
+      isSomeoneDisabled() {
+        return !!this.curTaskObj?.isSomeone;
+      },
       rightShow() {
         return (type) => {};
       }