695593266@qq.com 7 ay önce
ebeveyn
işleme
ecc94e37de

+ 11 - 0
src/api/produceOrder/index.js

@@ -266,3 +266,14 @@ export async function getUserInfo(id) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+/**
+ * 我的工单
+ */
+export async function getMyPage(params) {
+  const res = await request.post('/mes/workorder/my-page', params);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 12 - 0
src/api/workOrderList/index.js

@@ -184,3 +184,15 @@ export async function batchRecordPage(body) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 任务列表 班组任务
+
+export async function pageByCurrentCurrentUserTeam(data) {
+  const res = await request.get('/aps/assign/pageByCurrentUserTeam', {
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 185 - 55
src/views/entrust/components/create.vue

@@ -226,7 +226,12 @@
 </template>
 
 <script>
-  import { save, addSubmit, pleaseEntrustDetail } from '@/api/entrust/index';
+  import {
+    save,
+    addSubmit,
+    pleaseEntrustDetail,
+    update
+  } from '@/api/entrust/index';
   import produceOrder from './produceOrder';
   import detail from '@/views/bpm/processInstance/detail.vue';
   import deptSelect from '@/components/CommomSelect/dept-select.vue';
@@ -258,7 +263,8 @@
       factoriesId: '',
       priority: '',
       beEntrustedFactoriesId: '', //受托工厂id
-      beEntrustedFactoriesName: '' //受托工厂名称
+      beEntrustedFactoriesName: '', //受托工厂名称
+      id: ''
     };
   };
   export default {
@@ -562,29 +568,82 @@
       },
 
       async getDetail(id) {
-        await pleaseEntrustDetail(id).then((res) => {
-          this.form.pleaseEntrustDeptName = res.data.applyDeptName;
-          this.form.pleaseEntrustDeptId = res.data.applyDeptId;
-          this.form.pleaseEntrustUserName = res.data.createUserName;
-          this.form.pleaseEntrustUserId = res.data.createUserId;
-          this.form.factoriesId = res.data.applyFactoriesId;
-          this.form.factoriesName = res.data.applyFactoriesName;
-          this.form.beEntrustedDeptId = res.data.beEntrustedDeptId;
-          this.form.beEntrustedDeptName = res.data.beEntrustedDeptName;
-          this.form.beEntrustedFactoriesName =
-            res.data.beEntrustedFactoriesName;
-          this.form.beEntrustedFactoriesId = res.data.beEntrustedFactoriesId;
-          this.form.name = res.data.name;
-          this.form.type = res.data.type;
-          this.form.priority = res.data.priority;
-
-          res.data.taskList = [];
-
-          this.orderList.push(this.deepCopy(res.data));
-
-          // console.log(this.orderList, 'this.orderListthis.orderList');
-          this.getOrderTaskList();
-        });
+        try {
+          const res = await pleaseEntrustDetail(id);
+          const data = res?.data || {};
+
+          // 从 data 中结构需要的字段
+          const {
+            applyDeptName,
+            applyDeptId,
+            createUserName,
+            createUserId,
+            applyFactoriesId,
+            applyFactoriesName,
+            beEntrustedDeptId,
+            beEntrustedDeptName,
+            beEntrustedFactoriesName,
+            beEntrustedFactoriesId,
+            name,
+            type,
+            priority,
+            id: dataId
+          } = data;
+
+          // 一次性合并到 form
+          Object.assign(this.form, {
+            pleaseEntrustDeptName: applyDeptName,
+            pleaseEntrustDeptId: applyDeptId,
+            pleaseEntrustUserName: createUserName,
+            pleaseEntrustUserId: createUserId,
+            factoriesId: applyFactoriesId,
+            factoriesName: applyFactoriesName,
+            beEntrustedDeptId,
+            beEntrustedDeptName,
+            beEntrustedFactoriesName,
+            beEntrustedFactoriesId,
+            name,
+            type,
+            priority,
+            id: dataId
+          });
+
+          // 深拷贝时添加 taskList
+          const newData = {
+            ...this.deepCopy(data),
+            taskList: []
+          };
+
+          this.orderList.push(newData);
+
+          await this.getOrderTaskList();
+        } catch (error) {
+          console.error('加载委托详情失败:', error);
+        }
+
+        // await pleaseEntrustDetail(id).then((res) => {
+        //   this.form.pleaseEntrustDeptName = res.data.applyDeptName;
+        //   this.form.pleaseEntrustDeptId = res.data.applyDeptId;
+        //   this.form.pleaseEntrustUserName = res.data.createUserName;
+        //   this.form.pleaseEntrustUserId = res.data.createUserId;
+        //   this.form.factoriesId = res.data.applyFactoriesId;
+        //   this.form.factoriesName = res.data.applyFactoriesName;
+        //   this.form.beEntrustedDeptId = res.data.beEntrustedDeptId;
+        //   this.form.beEntrustedDeptName = res.data.beEntrustedDeptName;
+        //   this.form.beEntrustedFactoriesName =
+        //     res.data.beEntrustedFactoriesName;
+        //   this.form.beEntrustedFactoriesId = res.data.beEntrustedFactoriesId;
+        //   this.form.name = res.data.name;
+        //   this.form.type = res.data.type;
+        //   this.form.priority = res.data.priority;
+        //   this.form.id = res.data.id;
+
+        //   res.data.taskList = [];
+
+        //   this.orderList.push(this.deepCopy(res.data));
+
+        //   this.getOrderTaskList();
+        // });
       },
 
       removeOder() {
@@ -623,43 +682,103 @@
         this.visible = false;
       },
       choose(list) {
-        if (list.length == 0) {
+        // if (list.length == 0) {
+        //   this.orderList = [];
+        //   return;
+        // }
+
+        // const existingKeys = new Set(
+        //   this.orderList.map((i) => i.id || i.apsWorkOrderCode)
+        // );
+
+        // const newData = list.filter((item) =>
+        //   existingKeys.has(item.id || item.apsWorkOrderCode)
+        // );
+        // this.orderList = [];
+
+        // newData.forEach((it) => {
+        //   this.orderList.push(this.deepCopy(it));
+        // });
+
+        // const data = list.filter(
+        //   (item) => !existingKeys.has(item.id || item.apsWorkOrderCode)
+        // );
+
+        // data.forEach((item) => {
+        //   item.describes = '';
+        //   item.totalCount = '';
+        //   item.taskList = [];
+        //   item.taskId = '';
+        //   item.taskName = '';
+        //   item.beEntrustedFactoriesId = '';
+        //   item.beEntrustedFactoriesName = '';
+        //   item.status = '';
+        //   item.beEntrustedDeptName = '';
+        //   item.beEntrustedDeptId = '';
+        //   item.categoryName = item.productName;
+        //   item.categoryCode = item.productCode;
+        //   item.brandNum = item.brandNo;
+        //   item.modelType = item.model;
+        //   item.name = this.form.name;
+        //   item.type = this.form.type;
+        //   item.planDeliveryTime = item.startTime;
+        //   item.applyDeptId = this.form.pleaseEntrustDeptId;
+        //   item.applyDeptName = this.form.pleaseEntrustDeptName;
+        //   item.applyFactoriesId = this.form.factoriesId;
+        //   item.applyFactoriesName = this.form.factoriesName;
+        //   this.orderList.push(this.deepCopy(item));
+        // });
+
+        if (!list || list.length === 0) {
           this.orderList = [];
           return;
         }
 
-        const existingKeys = new Set(
-          this.orderList.map((i) => i.id || i.apsWorkOrderCode)
-        );
-        const data = list.filter(
-          (item) => !existingKeys.has(item.id || item.apsWorkOrderCode)
+        const getKey = (item) => item.id ?? item.apsWorkOrderCode ?? '';
+        const existingKeys = new Set(this.orderList.map(getKey));
+
+        const commonList = list.filter((item) =>
+          existingKeys.has(getKey(item))
         );
 
-        data.forEach((item) => {
-          item.describes = '';
-          item.totalCount = '';
-          item.taskList = [];
-          item.taskId = '';
-          item.taskName = '';
-          item.beEntrustedFactoriesId = '';
-          item.beEntrustedFactoriesName = '';
-          item.status = '';
-          item.beEntrustedDeptName = '';
-          item.beEntrustedDeptId = '';
-          item.categoryName = item.productName;
-          item.categoryCode = item.productCode;
-          item.brandNum = item.brandNo;
-          item.modelType = item.model;
-          item.name = this.form.name;
-          item.type = this.form.type;
-          item.planDeliveryTime = item.startTime;
-          item.applyDeptId = this.form.pleaseEntrustDeptId;
-          item.applyDeptName = this.form.pleaseEntrustDeptName;
-          item.applyFactoriesId = this.form.factoriesId;
-          item.applyFactoriesName = this.form.factoriesName;
-          this.orderList.push(this.deepCopy(item));
+        const newList = list.filter((item) => !existingKeys.has(getKey(item)));
+
+        const mergedList = [];
+
+        commonList.forEach((it) => {
+          mergedList.push(this.deepCopy(it));
+        });
+
+        // 处理新增
+        newList.forEach((item) => {
+          Object.assign(item, {
+            describes: '',
+            totalCount: '',
+            taskList: [],
+            taskId: '',
+            taskName: '',
+            beEntrustedFactoriesId: '',
+            beEntrustedFactoriesName: '',
+            status: '',
+            beEntrustedDeptName: '',
+            beEntrustedDeptId: '',
+            categoryName: item.productName,
+            categoryCode: item.productCode,
+            brandNum: item.brandNo,
+            modelType: item.model,
+            name: this.form.name,
+            type: this.form.type,
+            planDeliveryTime: item.startTime,
+            applyDeptId: this.form.pleaseEntrustDeptId,
+            applyDeptName: this.form.pleaseEntrustDeptName,
+            applyFactoriesId: this.form.factoriesId,
+            applyFactoriesName: this.form.factoriesName
+          });
+          mergedList.push(this.deepCopy(item));
         });
 
+        this.orderList = mergedList;
+
         this.getOrderTaskList();
       },
 
@@ -714,7 +833,18 @@
             item.approvalStatus = type == 1 ? 0 : 1;
           });
 
-          const URL = type == 1 ? save : addSubmit;
+          // const URL = type == 1 ? save : addSubmit;
+          let URL = '';
+          if (type == 1) {
+            console.log(this.form, '数据777');
+            if (this.form.id) {
+              URL = update;
+            } else {
+              URL = save;
+            }
+          } else {
+            URL = addSubmit;
+          }
 
           this.loading = this.$loading({
             lock: true,

+ 96 - 220
src/views/produce/components/juRenPackOne.vue

@@ -3,7 +3,7 @@
     title="打印条码"
     :visible.sync="QRvisible"
     v-if="QRvisible"
-    width="800px"
+    width="1000px"
     :maxable="true"
   >
     <div id="printSection">
@@ -12,96 +12,102 @@
           position: relative;
           width: 98mm;
           height: 70mm;
-          box-sizing: border-box;
-          font-size: 10px;
+          font-size: 2.65mm;
           color: green;
-          margin: 0 auto;
           font-weight: 700;
+          margin: 0 auto;
+          box-sizing: border-box;
         "
       >
-        <div style="display: flex; margin: 62px 0 0 75px; flex-direction: row">
-          <span style="display: inline-block; width: 70px; height: 19px">{{
+        <div
+          style="
+            display: flex;
+            margin: 16.64mm 0 0 20.88mm;
+            flex-direction: row;
+          "
+        >
+          <span style="display: inline-block; width: 18.52mm; height: 5.03mm">{{
             productName ? productName : ' '
           }}</span>
           <span
             style="
               display: inline-block;
-              margin-left: 35px;
-              width: 70px;
-              height: 19px;
+              margin-left: 9.79mm;
+              width: 18.52mm;
+              height: 5.03mm;
             "
             >{{ '123' }}</span
           >
         </div>
 
-        <div style="margin-left: 75px">
-          <span style="display: inline-block; width: 70px; height: 19px">{{
+        <div style="margin-left: 20.88mm">
+          <span style="display: inline-block; width: 18.52mm; height: 5.03mm">{{
             purchaseOrigins ? purchaseOrigins : ' '
           }}</span>
         </div>
 
-        <div style="margin-left: 75px">
-          <span style="display: inline-block; width: 70px; height: 19px">{{
+        <div style="margin-left: 20.88mm">
+          <span style="display: inline-block; width: 18.52mm; height: 5.03mm">{{
             specification ? specification : ' '
           }}</span>
           <span
             style="
               display: inline-block;
-              width: 70px;
-              margin-left: 35px;
-              height: 19px;
+              width: 18.52mm;
+              margin-left: 9.79mm;
+              height: 5.03mm;
             "
             >{{ netWeight ? netWeight : ' '
             }}{{ weightUnit ? weightUnit : ' ' }}</span
           >
         </div>
 
-        <div style="margin: 2px 0 0 130px">
-          <span style="display: inline-block; height: 19px">{{
+        <div style="margin: 0.53mm 0 0 34.39mm">
+          <span style="display: inline-block; height: 5.03mm">{{
             level ? level : ' '
           }}</span>
         </div>
 
-        <div style="margin: 3px 0 0 75px">
-          <span style="display: inline-block; width: 60px; height: 19px">{{
+        <div style="margin: 0.79mm 0 0 20.88mm">
+          <span style="display: inline-block; width: 15.87mm; height: 5.03mm">{{
             batchNo ? batchNo : ' '
           }}</span>
 
           <span
             style="
               display: inline-block;
-              margin-left: 42px;
-              width: 67px;
-              height: 19px;
+              margin-left: 11.64mm;
+              width: 17.72mm;
+              height: 5.03mm;
             "
             >{{ createDate ? createDate : ' ' }}</span
           >
           <span
             style="
               display: inline-block;
-              margin-left: 42px;
-              width: 60px;
-              height: 19px;
+              margin-left: 10.84mm;
+              width: 20mm;
+              height: 5.03mm;
             "
             >{{ warrantyPeriod ? warrantyPeriod : 0
             }}{{ warrantyPeriodUnit ? warrantyPeriodUnit : ' ' }}</span
           >
         </div>
 
-        <div style="margin: 3px 0 0 75px">
-          <span style="display: inline-block; height: 19px">{{
+        <div style="margin: 0.79mm 0 0 20.88mm">
+          <span style="display: inline-block; height: 5.03mm">{{
             notice ? notice : ' '
           }}</span>
         </div>
 
-        <div style="margin: 3px 0 0 75px">
-          <span style="display: inline-block; height: 19px">{{
+        <div style="margin: 0.79mm 0 0 20.88mm">
+          <span style="display: inline-block; height: 5.03mm">{{
             layBy ? layBy : ' '
           }}</span>
         </div>
 
-        <div style="margin: 3px 0 0 75px">
-          <span style="display: inline-block; height: 19px">{{
+        <div style="margin: 0.79mm 0 0 20.88mm">
+          <span style="display: inline-block; height: 5.03mm">{{
             enforceStandards ? enforceStandards : ' '
           }}</span>
         </div>
@@ -109,13 +115,16 @@
         <div
           style="
             position: absolute;
-            top: -15px;
-            right: 80px;
-            width: 50px;
-            height: 50px;
+            top: -2mm;
+            right: 2mm;
+            width: 12mm;
+            height: 12mm;
           "
         >
-          <img style="width: 100%; height: 100%" :src="url" />
+          <img
+            style="width: 100%; height: 100%; object-fit: contain"
+            :src="url"
+          />
         </div>
       </div>
     </div>
@@ -156,75 +165,23 @@
     methods: {
       open(item, workOrderId) {
         this.QRvisible = true;
-        const {
-          batchNo,
-          createDate,
-          enforceStandards,
-          layBy,
-          level,
-          netWeight,
-          notice,
-          productName,
-          purchaseOrigins,
-          specification,
-          warrantyPeriod,
-          warrantyPeriodUnit,
-          weightUnit
-        } = item;
+        Object.assign(this, item);
+        this.workOrderId = workOrderId || '';
 
-        this.productName = productName ? productName : '';
-        this.batchNo = batchNo ? batchNo : '';
-        this.createDate = createDate ? createDate : '';
-        this.enforceStandards = enforceStandards ? enforceStandards : '';
-        this.layBy = layBy ? layBy : '';
-        this.level = level ? level : '';
-        this.netWeight = netWeight ? netWeight : '';
-        this.notice = notice ? notice : '';
-        this.purchaseOrigins = purchaseOrigins ? purchaseOrigins : '';
-        this.specification = specification ? specification : '';
-        this.warrantyPeriod =
-          warrantyPeriod && !warrantyPeriod ? warrantyPeriod : '';
-        this.warrantyPeriodUnit = warrantyPeriodUnit ? warrantyPeriodUnit : '';
-        this.weightUnit = weightUnit ? weightUnit : '';
-        this.workOrderId = workOrderId ? workOrderId : '';
+        const unitMap = { 1: '分钟', 2: '小时', 3: '日', 4: '月', 5: '年' };
+        this.warrantyPeriodUnit = unitMap[this.warrantyPeriodUnit] || '';
 
-        if (this.warrantyPeriodUnit === '1') {
-          this.warrantyPeriodUnit = '分钟';
-        } else if (this.warrantyPeriodUnit === '2') {
-          this.warrantyPeriodUnit = '小时';
-        } else if (this.warrantyPeriodUnit === '3') {
-          this.warrantyPeriodUnit = '日';
-        } else if (this.warrantyPeriodUnit === '4') {
-          this.warrantyPeriodUnit = '月';
-        } else if (this.warrantyPeriodUnit === '5') {
-          this.warrantyPeriodUnit = '年';
-        } else {
-          this.warrantyPeriodUnit = '';
-        }
-
-        this.qrCodeUrl =
-          window.location.origin + `/traceability?id=${this.workOrderId}`;
-
-        // this.qrCodeUrl = `http://192.168.1.22:9999/traceability?id=${this.workOrderId}`;
-
-        // console.log(window.location.origin, 'window.location.origin');
-
-        this.$nextTick(() => {
-          this.generateQRCodes();
-        });
+        this.qrCodeUrl = `${window.location.origin}/traceability?id=${this.workOrderId}`;
+        this.$nextTick(this.generateQRCodes);
       },
 
       generateQRCodes() {
         if (this.workOrderId) {
-          QRCode.toDataURL(this.qrCodeUrl)
+          QRCode.toDataURL(this.qrCodeUrl, { width: 200, margin: 1 })
             .then((url) => {
-              // item.qrcode = url;
               this.url = url;
-              this.$forceUpdate();
             })
-            .catch((err) => {
-              console.error(err);
-            });
+            .catch(console.error);
         }
       },
 
@@ -237,135 +194,54 @@
         // 创建打印任务
         const printWindow = window.open('', '_blank');
         printWindow.document.open();
-        printWindow.document.write('<html><head><title>打印预览</title>');
-        printWindow.document.write(
-          '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
-        );
-        printWindow.document.write('</head><body>');
-        printWindow.document.write(printSection.innerHTML);
-        printWindow.document.write('</body></html>');
+        // printWindow.document.write('<html><head><title>打印预览</title>');
+        // printWindow.document.write(
+        //   '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
+        // );
+        // printWindow.document.write('</head><body>');
+        // printWindow.document.write(printSection.innerHTML);
+        // printWindow.document.write('</body></html>');
+
+        printWindow.document.write(`
+       <html>
+  <head>
+    <title>打印预览</title>
+    <style>
+      @media print {
+        body {
+          margin: 0;
+          padding: 0;
+        }
+        #printSection {
+          width: 98mm;
+          height: 70mm;
+          box-sizing: border-box;
+          position: relative;
+          overflow: visible !important;
+        }
+        #printSection span {
+          white-space: nowrap; /* 避免换行 */
+          overflow: visible !important;
+        }
+        #printSection img {
+          object-fit: contain;
+        }
+      }
+    </style>
+  </head>
+  <body>
+    ${printSection.innerHTML}
+  </body>
+</html>
+      `);
+
         printWindow.document.close();
         printWindow.onload = function () {
           printWindow.print();
         };
       }
-
-      // print() {
-      //   const printSection = document.getElementById('printSection');
-      //   // 创建打印任务
-      //   const printWindow = window.open('', '_blank');
-      //   printWindow.document.open();
-      //   printWindow.document.write('<html><head><title>打印预览</title>');
-      //   printWindow.document.write(
-      //     '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
-      //   );
-      //   printWindow.document.write('</head><body>');
-      //   printWindow.document.write(printSection.innerHTML);
-      //   printWindow.document.write('</body></html>');
-      //   printWindow.document.close();
-      //   // printWindow.onload = function () {
-      //   //   printWindow.print();
-      //   // };
-      // }
     }
   };
 </script>
 
-<style scoped lang="scss">
-  .label-container {
-    position: relative;
-    width: 90mm;
-    height: 70mm;
-    box-sizing: border-box;
-    font-size: 8px;
-    color: green;
-    margin: 0 auto;
-    font-weight: 700;
-
-    .ju_ren_one_level {
-      display: flex;
-      margin: 63px 0 0 64px;
-      flex-direction: row;
-
-      span {
-        display: inline-block;
-        width: 70px;
-        height: 19px;
-      }
-
-      .ju_ren_one_level_two {
-        margin-left: 35px;
-      }
-    }
-
-    .ju_ren_two_level {
-      margin-left: 64px;
-
-      span {
-        display: inline-block;
-        width: 70px;
-        height: 19px;
-      }
-
-      .ju_ren_one_level_two {
-        margin-left: 35px;
-      }
-
-      .ju_ren_two_level_two {
-        margin-left: 100px;
-      }
-    }
-
-    .ju_ren_Three_level {
-      margin: 2px 0 0 110px;
-
-      span {
-        display: inline-block;
-        height: 19px;
-      }
-    }
-    .ju_ren_four_level {
-      margin: 3px 0 0 64px;
-
-      span {
-        display: inline-block;
-        width: 60px;
-        height: 19px;
-      }
-
-      .ju_ren_one_level_two {
-        margin-left: 42px;
-      }
-
-      .ju_ren_two_level_two {
-        margin-left: 42px;
-      }
-
-      .two_text {
-        width: 65px;
-      }
-    }
-
-    .ju_ren_five_level {
-      margin: 3px 0 0 64px;
-
-      span {
-        display: inline-block;
-        height: 19px;
-      }
-    }
-
-    .qr_code {
-      position: absolute;
-      top: 0;
-      right: 15px;
-      width: 60px;
-      height: 60px;
-
-      img {
-        width: 100%;
-        height: 100%;
-      }
-    }
-  }
-</style>
+<style scoped lang="scss"></style>

+ 9 - 0
src/views/produce/components/outsourcing/outsourceList.vue

@@ -906,6 +906,15 @@
           }
         }
 
+        if (this.standardOutputList.length != 0) {
+          for (let item of this.standardOutputList) {
+            if (!item.demandQuantity) {
+              this.$message.warning('产出清单数量不能为空');
+              return;
+            }
+          }
+        }
+
         this.outObj.formedNumLast = this.outsourceData.formedNumLast;
 
         let param = {

+ 18 - 26
src/views/produceOrder/index.vue

@@ -244,7 +244,8 @@
     update,
     getTaskIdByInstanceId,
     updateStatusPause,
-    updateStatusTerminate
+    updateStatusTerminate,
+    getMyPage
   } from '@/api/produceOrder/index.js';
   import xlhView from './components/xlhView.vue';
   import { fieldModel } from '@/api/produceWord/index.js';
@@ -797,24 +798,6 @@
           }
         },
         immediate: true
-      },
-      tabValue: {
-        // handler(newVal) {
-        //   if (newVal === '6') {
-        //     this.columns.splice(3, 1);
-        //   } else {
-        //     if (this.columns[3].label !== '生产订单号') {
-        //       this.columns.splice(3, 0, {
-        //         label: '生产订单号',
-        //         slot: 'apsWorkOrderCode',
-        //         align: 'center',
-        //         minWidth: 110,
-        //         showOverflowTooltip: true
-        //       });
-        //     }
-        //   }
-        // },
-        // immediate: true
       }
     },
     created() {
@@ -904,23 +887,32 @@
 
       /* 表格数据源 */
       async datasource({ page, limit, where, order }) {
-        // console.log('1123',where)
-        where.statusList = [this.tabValue];
-        let res = await getPage({
+        console.log(this.tabValue, '888');
+        let statusList = this.tabValue == 1 ? [4, 5, 7] : [this.tabValue];
+
+        let params = {
           ...where,
           ...order,
           queryTermination: this.tabValue == '10' ? 1 : 0,
           pageNum: page,
           size: limit,
           ...this.sort
-        });
-        // res['list'] = this.flattenArray(res.list)
-        // this.getWorkData();
+        };
+
+        // 只有 tabValue == 1 才可能需要 workCenterIds 字段,可根据业务决定是否添加
+        if (this.tabValue == 1) {
+          params.workCenterIds = this.$store.state.user.info.workCenterIds;
+        }
+
+        const URL = this.tabValue == 1 ? getMyPage : getPage;
+
+        let res = await URL({ ...params, statusList });
+
         return res;
       },
 
       getWorkData() {
-        if(this.$refs.table.getData().length != 0) {
+        if (this.$refs.table.getData().length != 0) {
           // const data = this.deep()
         }
       },

+ 30 - 4
src/views/taskList/index.vue

@@ -10,6 +10,11 @@
           name="2"
           v-if="$hasPermission('mes:taskreport:allorder')"
         ></el-tab-pane>
+        <el-tab-pane
+          label="班组任务"
+          name="3"
+          v-if="$hasPermission('mes:taskreport:teamorder')"
+        ></el-tab-pane>
 
         <!-- <el-tab-pane label="我的任务" name="1"></el-tab-pane>
         <el-tab-pane label="全部任务" name="2"></el-tab-pane> -->
@@ -160,7 +165,8 @@
     pageByCurrentUserLeader,
     listUpdateRealTimeRecord,
     taskManagement,
-    transferTasks
+    transferTasks,
+    pageByCurrentCurrentUserTeam
   } from '@/api/workOrderList';
   import { revokeWork } from '@/api/manufacture/spreadWorkOrder';
 
@@ -469,12 +475,32 @@
       datasource({ page, limit, where }) {
         if (this.tabValue && this.tabValue != 0) {
           let api =
-            this.tabValue === '1' ? pageByCurrentUser : pageByCurrentUserLeader;
-          return api({
+            this.tabValue === '1'
+              ? pageByCurrentUser
+              : this.tabValue == '2'
+              ? pageByCurrentUserLeader
+              : pageByCurrentCurrentUserTeam;
+
+          let params = {
             ...where,
             pageNum: page,
             size: limit
-          });
+          };
+
+          if (this.tabValue === '3') {
+            params.teamIdsStr = this.$store.state.user.info?.teamId;
+            // if (teamId) {
+            //   const ids = teamId
+            //     .split(',')
+            //     .map((i) => i.trim())
+            //     .filter(Boolean);
+            //   params.teamIds = ids; // 不要加 []
+            // }
+          }
+
+          console.log(params);
+
+          return api(params);
         } else {
           return [];
         }

+ 5 - 1
src/views/unacceptedProduct/detail.vue

@@ -222,7 +222,11 @@
           "
         >
           <el-form-item label="入库仓库:" prop="depotId" align="center">
-            <el-select style="width: 100%" v-model="disposeForm.depotId">
+            <el-select
+              style="width: 100%"
+              v-model="disposeForm.depotId"
+              filterable
+            >
               <el-option
                 v-for="item in warehouseList"
                 :key="item.id"