瀏覽代碼

修改bug

695593266@qq.com 8 月之前
父節點
當前提交
d3f4fb1ace

+ 11 - 1
src/views/outsourcing/index.vue

@@ -74,6 +74,11 @@
           >
         </template>
 
+        <template v-slot:isLast="{ row }">
+          <el-tag v-if="row.isLast == 0">否</el-tag>
+          <el-tag v-if="row.isLast == 1" type="success">是</el-tag>
+        </template>
+
         <template v-slot:purchaseStatus="{ row }">
           <el-tag v-if="row.purchaseStatus == 0 || !row.purchaseStatus"
             >未入库</el-tag
@@ -369,7 +374,12 @@
             prop: 'technicalDrawings',
             minWidth: 100
           },
-
+          {
+            label: '是否尾工序',
+            slot: 'isLast',
+            prop: 'isLast',
+            minWidth: 100
+          },
           {
             label: '附件',
             slot: 'files',

+ 7 - 2
src/views/produce/components/feeding/components/workOrderBom.vue

@@ -212,8 +212,13 @@
     },
 
     mounted() {
-      this.getTaskReportNum();
-      this.getProcessMonitoringNum();
+      if (
+        this.item.currentTaskDiagram &&
+        this.item.currentTaskDiagram.sourceTaskId
+      ) {
+        this.getTaskReportNum();
+        this.getProcessMonitoringNum();
+      }
     },
 
     methods: {

+ 25 - 0
src/views/produce/components/feeding/index.vue

@@ -544,6 +544,20 @@
         this.$forceUpdate();
       },
 
+      getNowTime() {
+        const now = new Date();
+
+        const year = now.getFullYear();
+        const month = String(now.getMonth() + 1).padStart(2, '0');
+        const day = String(now.getDate()).padStart(2, '0');
+
+        const hour = String(now.getHours()).padStart(2, '0');
+        const minute = String(now.getMinutes()).padStart(2, '0');
+        const second = String(now.getSeconds()).padStart(2, '0');
+
+        return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
+      },
+
       async getChooseEngrave() {
         await parameterGetByCode({
           code: 'choose_engrave'
@@ -551,6 +565,17 @@
           this.isChoose = res.value == '1' ? true : false;
         });
 
+        await parameterGetByCode({
+          code: 'mes_order_feed_by_default_date'
+        }).then((res) => {
+          if (res.value == '1') {
+            const dateTime = this.getNowTime();
+            this.List.forEach((item) => {
+              item.executorTime = dateTime;
+            });
+          }
+        });
+
         await parameterGetByCode({
           code: 'batch_update_engrave'
         }).then((res) => {

+ 25 - 0
src/views/produce/components/jobBooking/index.vue

@@ -790,6 +790,20 @@
         });
       },
 
+      getNowTime() {
+        const now = new Date();
+
+        const year = now.getFullYear();
+        const month = String(now.getMonth() + 1).padStart(2, '0');
+        const day = String(now.getDate()).padStart(2, '0');
+
+        const hour = String(now.getHours()).padStart(2, '0');
+        const minute = String(now.getMinutes()).padStart(2, '0');
+        const second = String(now.getSeconds()).padStart(2, '0');
+
+        return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
+      },
+
       async getChooseEngrave() {
         await parameterGetByCode({
           code: 'work_hour'
@@ -797,6 +811,17 @@
           this.isReportTime = res.value == '1' ? true : false;
         });
 
+        await parameterGetByCode({
+          code: 'mes_order_feed_by_default_date'
+        }).then((res) => {
+          if (res.value == '1') {
+            const dateTime = this.getNowTime();
+            this.List.forEach((item) => {
+              item.workReportInfo.executorTime = dateTime;
+            });
+          }
+        });
+
         await parameterGetByCode({
           code: 'choose_engrave'
         }).then((res) => {

+ 11 - 1
src/views/produce/components/outsourcing/details.vue

@@ -60,6 +60,11 @@
         >
       </template>
 
+      <template v-slot:isLast="{ row }">
+        <el-tag v-if="row.isLast == 0">否</el-tag>
+        <el-tag v-if="row.isLast == 1" type="success">是</el-tag>
+      </template>
+
       <template v-slot:type="{ row }">
         <div v-if="row.type == 1">采购委外</div>
         <div v-if="row.type == 2">直接发货委外</div>
@@ -504,7 +509,12 @@
             align: 'center',
             showOverflowTooltip: true
           },
-
+          {
+            label: '是否尾工序',
+            slot: 'isLast',
+            prop: 'isLast',
+            minWidth: 100
+          },
           {
             slot: 'approvalStatus',
             label: '审核状态',

+ 17 - 253
src/views/produce/components/outsourcing/new_outsourceList.vue

@@ -139,6 +139,7 @@
                 v-model="attributeData.deliveryMethod"
                 placeholder="请选择"
                 @change="changeMethod"
+                style="width: 135px"
               >
                 <el-option
                   v-for="item in deliveryMethodTypeList"
@@ -160,6 +161,15 @@
               </el-link>
             </el-form-item>
           </el-col>
+
+          <el-col :span="12" v-if="isInfo">
+            <el-form-item label="是否尾工序:" prop="isLast">
+              <el-radio-group v-model="attributeData.isLast">
+                <el-radio :label="1">是</el-radio>
+                <el-radio :label="0">否</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
         </el-row>
       </el-form>
 
@@ -169,28 +179,6 @@
       </div>
     </div>
 
-    <!-- <el-descriptions> -->
-    <!-- <el-descriptions-item label="委外名称">{{
-          outsourceData.name
-        }}</el-descriptions-item>
-        <el-descriptions-item label="委外类型">{{
-          outsourceData.type == 4 ? '带料委外' : '不带料委外'
-        }}</el-descriptions-item>
-
-        <el-descriptions-item label="委外数量">{{
-          outsourceData.formedNumLast
-        }}</el-descriptions-item> -->
-
-    <!-- <el-descriptions-item label="直接入库">{{ outObj.isInWarehouse == 1 ? '是' : '否' }}</el-descriptions-item> -->
-    <!-- <el-descriptions-item label="直接入库">{{ '是' }}</el-descriptions-item> -->
-
-    <!-- <el-descriptions-item v-if="outsourceData.deliveryMethod == 2">
-          <el-button type="primary" size="mini" @click="batchDeliveryTime"
-            >设置分批到货时间</el-button
-          >
-        </el-descriptions-item> -->
-    <!-- </el-descriptions> -->
-
     <el-tabs v-model="activeName" v-if="timeList.length == 0">
       <el-tab-pane label="物品清单" name="0">
         <div class="materialList">
@@ -958,7 +946,8 @@
           factoriesName: '',
           taskDataList: [],
           priority: '',
-          deliveryMethod: 1
+          deliveryMethod: 1,
+          isLast: 0
         },
         timeList: [],
         rules: {
@@ -1203,15 +1192,9 @@
         this.attributeData.formedNumLast = total + batchTotal;
       },
 
-      handleRowSelect(selection, row) {
-        // console.log(selection, 'handleRowSelect');
-        // this.changNumber(selection);
-      },
+      handleRowSelect(selection, row) {},
 
-      handleSelectAll(selection) {
-        // console.log(selection, 'handleSelectAll');
-        // this.changNumber(selection);
-      },
+      handleSelectAll(selection) {},
 
       inputNum(item, index) {
         if (item.feedQuantity) {
@@ -1474,226 +1457,6 @@
         });
       },
 
-      // chooseTime(current, clonedTimeList, currentIndex) {
-      //   if (clonedTimeList.length === 0) {
-      //     this.timeList = [];
-      //     this.attributeData.formedNumLast = 0;
-      //     this.pickOutInListSelect = [];
-
-      //     this.$nextTick(() => {
-      //       if (this.$refs.pickOutRef) {
-      //         this.$refs.pickOutRef.clearSelection();
-      //       }
-      //     });
-
-      //     return;
-      //   }
-
-      //   if (
-      //     this.workData.list[0].singleReport == 1 ||
-      //     this.pickOutInList.length > 1
-      //   ) {
-      //     this.timeList = clonedTimeList.map((item) => item);
-      //     const selectedIds = new Set();
-      //     for (let item of this.timeList) {
-      //       for (let it of item.pickOutInList) {
-      //         selectedIds.add(it.id);
-      //       }
-      //     }
-
-      //     this.attributeData.formedNumLast = this.timeList.reduce(
-      //       (acc, pro) => {
-      //         const num = parseFloat(pro.purchaseQuantity);
-      //         return acc + (isNaN(num) ? 0 : num);
-      //       },
-      //       0
-      //     );
-
-      //     const unassignedList = this.pickOutInList.filter(
-      //       (item) => !selectedIds.has(item.id)
-      //     );
-
-      //     const totalNum = this.pickOutInList.reduce(
-      //       (sum, item) => sum + Number(item.feedQuantity || 0),
-      //       0
-      //     );
-
-      //     if (unassignedList.length > 0) {
-      //       const number = unassignedList.reduce(
-      //         (sum, item) => sum + Number(item.feedQuantity || 0),
-      //         0
-      //       );
-
-      //       const data = {
-      //         batchNo: '一次性到货',
-      //         requireDeliveryTime: null,
-      //         purchaseQuantity: number,
-      //         pickOutInList: unassignedList,
-      //         bomMaterialList: [],
-      //         standardOutputList: [],
-      //         isParent: 1
-      //       };
-
-      //       const exists = this.timeList.some((t) => t.batchNo == '一次性到货');
-
-      //       if (!exists) {
-      //         this.timeList.unshift(data);
-      //       } else {
-      //         const index = this.timeList.findIndex(
-      //           (t) => t.batchNo == '一次性到货'
-      //         );
-      //         this.timeList.splice(index, 1, data);
-      //       }
-      //     }
-
-      //     if (this.bomMaterialList.length != 0) {
-      //       for (let item of this.bomMaterialList) {
-      //         for (let it of this.timeList) {
-      //           const proportion = this.div(it.purchaseQuantity, totalNum);
-      //           const allocatedQuantity = this.mul(
-      //             proportion,
-      //             item.demandQuantity
-      //           );
-
-      //           const materialItem = {
-      //             ...item,
-      //             demandQuantity: allocatedQuantity
-      //           };
-
-      //           it.bomMaterialList.push(materialItem);
-      //         }
-      //       }
-      //     }
-
-      //     if (this.standardOutputList.length != 0) {
-      //       for (let item of this.standardOutputList) {
-      //         for (let it of this.timeList) {
-      //           const proportion = this.div(it.purchaseQuantity, totalNum);
-      //           const allocatedQuantity = this.mul(
-      //             proportion,
-      //             item.demandQuantity
-      //           );
-
-      //           const materialItem = {
-      //             ...item,
-      //             demandQuantity: allocatedQuantity
-      //           };
-
-      //           it.standardOutputList.push(materialItem);
-      //         }
-      //       }
-      //     }
-
-      //     this.timeList[0].innerActive = '0';
-      //     this.activeBatch = this.timeList[0].batchNo;
-      //     this.pickOutInListSelect = [];
-      //   } else {
-      //     if (this.pickOutInList.length == 1) {
-      //       this.timeList = clonedTimeList.map((item) => {
-      //         item.pickOutInList = [this.deepCopy(this.pickOutInListSelect[0])];
-
-      //         return item;
-      //       });
-
-      //       this.attributeData.formedNumLast = this.timeList.reduce(
-      //         (acc, pro) => {
-      //           const num = parseFloat(pro.purchaseQuantity);
-      //           return acc + (isNaN(num) ? 0 : num);
-      //         },
-      //         0
-      //       );
-      //       const totalNum = this.pickOutInList.reduce(
-      //         (sum, item) => sum + Number(item.feedQuantity || 0),
-      //         0
-      //       );
-      //       const batchNum = this.timeList.reduce(
-      //         (sum, item) => sum + Number(item.purchaseQuantity || 0),
-      //         0
-      //       );
-
-      //       let singleWeight = 0;
-
-      //       if (
-      //         this.pickOutInList[0].newWeight ||
-      //         this.pickOutInList[0].newWeight == 0
-      //       ) {
-      //         singleWeight = this.div(
-      //           this.pickOutInList[0].newWeight,
-      //           totalNum
-      //         );
-      //       }
-      //       const remainderNum = this.sub(totalNum, batchNum);
-      //       if (remainderNum != 0) {
-      //         const data = {
-      //           batchNo: '一次性到货',
-      //           requireDeliveryTime: null,
-      //           purchaseQuantity: remainderNum,
-      //           pickOutInList: [this.deepCopy(this.pickOutInListSelect[0])],
-      //           bomMaterialList: [],
-      //           standardOutputList: [],
-      //           isParent: 1
-      //         };
-      //         const exists = this.timeList.some(
-      //           (t) => t.batchNo == '一次性到货'
-      //         );
-      //         if (!exists) {
-      //           this.timeList.unshift(data);
-      //         } else {
-      //           const index = this.timeList.findIndex(
-      //             (t) => t.batchNo == '一次性到货'
-      //           );
-      //           this.timeList.splice(index, 1, data);
-      //         }
-      //       }
-      //       if (this.bomMaterialList.length != 0) {
-      //         for (let item of this.bomMaterialList) {
-      //           for (let it of this.timeList) {
-      //             const proportion = this.div(it.purchaseQuantity, totalNum);
-      //             const allocatedQuantity = this.mul(
-      //               proportion,
-      //               item.demandQuantity
-      //             );
-      //             const materialItem = {
-      //               ...item,
-      //               demandQuantity: allocatedQuantity
-      //             };
-      //             it.bomMaterialList.push(materialItem);
-      //           }
-      //         }
-      //       }
-      //       if (this.standardOutputList.length != 0) {
-      //         for (let item of this.standardOutputList) {
-      //           for (let it of this.timeList) {
-      //             const proportion = this.div(it.purchaseQuantity, totalNum);
-      //             const allocatedQuantity = this.mul(
-      //               proportion,
-      //               item.demandQuantity
-      //             );
-      //             const materialItem = {
-      //               ...item,
-      //               demandQuantity: allocatedQuantity
-      //             };
-      //             it.standardOutputList.push(materialItem);
-      //           }
-      //         }
-      //       }
-
-      //       this.timeList = this.timeList.map((it) => {
-      //         it.pickOutInList.forEach((item) => {
-      //           item.feedQuantity = it.purchaseQuantity;
-      //           item.newWeight = this.mul(singleWeight, it.purchaseQuantity);
-      //         });
-
-      //         return it;
-      //       });
-
-      //       this.timeList[0].innerActive = '0';
-      //       this.activeBatch = this.timeList[0].batchNo;
-      //       this.pickOutInListSelect = [];
-      //     }
-      //   }
-      // },
-
       chooseTime(current, clonedTimeList, currentIndex) {
         if (clonedTimeList.length === 0) {
           this.resetAll();
@@ -1883,6 +1646,7 @@
           maxFactor
         );
       },
+
       sub(a, b) {
         const { int: aInt, factor: aFactor } = this.toInteger(a);
         const { int: bInt, factor: bFactor } = this.toInteger(b);
@@ -1892,6 +1656,7 @@
           maxFactor
         );
       },
+
       mul(a, b) {
         const aLen = this.getDecimalLength(a);
         const bLen = this.getDecimalLength(b);
@@ -1901,6 +1666,7 @@
           Math.pow(10, aLen + bLen)
         );
       },
+
       div(a, b) {
         const aLen = this.getDecimalLength(a);
         const bLen = this.getDecimalLength(b);
@@ -1912,8 +1678,6 @@
       },
 
       handOK(isRelease) {
-        // isRelease? 0 提交 2提交并发布
-
         if (!this.attributeData.requireDeliveryTime) {
           return this.$message.warning('请选择交付日期!');
         }

+ 2 - 1
src/views/produce/components/qualityInspection/components/selfInspectionReporting.vue

@@ -161,7 +161,8 @@
         :need-page="false"
         @refresh="getData"
         :selection.sync="selection"
-      ></ele-pro-table>
+      >
+      </ele-pro-table>
     </el-form>
 
     <span slot="footer" class="dialog-footer">

+ 25 - 0
src/views/produce/components/warehousing/index.vue

@@ -482,6 +482,20 @@
           });
       },
 
+      getNowTime() {
+        const now = new Date();
+
+        const year = now.getFullYear();
+        const month = String(now.getMonth() + 1).padStart(2, '0');
+        const day = String(now.getDate()).padStart(2, '0');
+
+        const hour = String(now.getHours()).padStart(2, '0');
+        const minute = String(now.getMinutes()).padStart(2, '0');
+        const second = String(now.getSeconds()).padStart(2, '0');
+
+        return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
+      },
+
       async getChooseEngrave() {
         await parameterGetByCode({
           code: 'choose_engrave'
@@ -489,6 +503,17 @@
           this.isChoose = res.value == '1' ? true : false;
         });
 
+        await parameterGetByCode({
+          code: 'mes_order_feed_by_default_date'
+        }).then((res) => {
+          if (res.value == '1') {
+            const dateTime = this.getNowTime();
+            this.List.forEach((item) => {
+              item.workReportInfo.executorTime = dateTime;
+            });
+          }
+        });
+
         await parameterGetByCode({
           code: 'batch_update_engrave'
         }).then((res) => {

+ 4 - 1
src/views/produce/components/workPlan/components/newQualityContentTabs.vue

@@ -1212,8 +1212,11 @@
         this.$refs.inspectionTemplateRef.open(type);
       },
       async inspectionTemplateSuccess(select) {
+        // const list = Array.isArray(select) ? select : [select];
         let data = await getQualityTemplateByIds({
-          templateIds: select.map((item) => item.id)
+          templateIds: (Array.isArray(select) ? select : [select]).map(
+            (i) => i.id
+          )
         });
 
         data.forEach((item) => {

+ 232 - 0
src/views/produceOrder/components/chooseStation.vue

@@ -0,0 +1,232 @@
+<template>
+  <ele-modal
+    :width="modelWidth"
+    :visible.sync="dispatchVisible"
+    v-if="dispatchVisible"
+    :close-on-click-modal="false"
+    custom-class="ele-dialog-form"
+    :maxable="true"
+    title="选择工位"
+    append-to-body
+    :before-close="cancel"
+  >
+    <ele-pro-table
+      ref="table"
+      :columns="columns"
+      :datasource="datasource"
+      @update:selection="handleSelectionChange"
+      :cache-key="cacheKeyUrl"
+      :pageSize="20"
+      :selection.sync="selection"
+      :row-click-checked="true"
+      :row-click-checked-intelligent="false"
+      row-key="id"
+    >
+      <template v-slot:meterTime="{ row }">
+        <div v-if="row.extInfo.meterTime">
+          {{ `${row.extInfo.meterTime}  ${row.extInfo.meterTimeUnit}/次 ` }}
+        </div>
+      </template>
+
+      <template v-slot:enabled="{ row }">
+        {{ dict.enabled[row.enabled] }}
+      </template>
+    </ele-pro-table>
+
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="dispatchVisible = false">取 消</el-button>
+      <el-button type="primary" @click="comfirm">确定</el-button>
+    </span>
+  </ele-modal>
+</template>
+
+<script>
+  import { getFactoryworkstation } from '@/api/factoryModel';
+  export default {
+    data() {
+      return {
+        dispatchVisible: false,
+        workCenterId: '',
+        cacheKeyUrl: 'chooseStation-2025-12-04',
+        selection: [],
+        dict: {
+          groupId: [],
+          factory: [],
+          enabled: {
+            1: '生效',
+            0: '未生效'
+          }
+        },
+        allSelection: [],
+        index: '',
+        sourceTaskId: ''
+      };
+    },
+
+    computed: {
+      modelWidth() {
+        return '75vw';
+      },
+
+      columns() {
+        return [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            reserveSelection: true,
+            selectable: (row) => this.isRowSelectable(row)
+          },
+          {
+            columnKey: 'index',
+            slot: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '工位编码',
+            showOverflowTooltip: true
+          },
+          {
+            label: '工位名称',
+            prop: 'name',
+            showOverflowTooltip: true
+          },
+          {
+            label: '责任人',
+            prop: 'leaderName',
+            slot: 'factory',
+            showOverflowTooltip: true
+          },
+          {
+            label: '所属区域',
+            prop: 'areaName',
+            showOverflowTooltip: true
+          },
+
+          {
+            label: '所属工厂',
+            prop: 'factoryName',
+            showOverflowTooltip: true
+          },
+
+          {
+            label: '所属厂房',
+            prop: 'workshopPlanName',
+            showOverflowTooltip: true
+          },
+          {
+            label: '所属车间',
+            prop: 'workshopName',
+            showOverflowTooltip: true
+          },
+          {
+            label: '所属产线',
+            prop: 'productionLineName',
+            showOverflowTooltip: true
+          },
+          {
+            label: '设备名称',
+            prop: 'extInfo.assetName',
+            formatter: (_row, _column, cellValue) => {
+              return typeof cellValue === 'string' ? cellValue : '';
+            },
+            showOverflowTooltip: true
+          },
+          {
+            label: '设备编码',
+            prop: 'extInfo.assetCode',
+            formatter: (_row, _column, cellValue) => {
+              return typeof cellValue === 'string' ? cellValue : '';
+            },
+            showOverflowTooltip: true
+          },
+          {
+            label: '节拍时间',
+            prop: 'extInfo.meterTime',
+            slot: 'meterTime',
+            showOverflowTooltip: true
+          },
+          {
+            //修改此prop名称时,请同步修改columnKey属性和下方selectType方法
+            label: '状态',
+            prop: 'enabled',
+            slot: 'enabled',
+            filters: [
+              { value: 1, text: '生效' },
+              { value: 0, text: '未生效' }
+            ],
+            filterMultiple: false,
+            columnKey: 'enabled',
+            showOverflowTooltip: true
+          }
+        ];
+      }
+    },
+
+    methods: {
+      open(id, list = [], index) {
+        this.dispatchVisible = true;
+        this.index = index;
+        this.workCenterId = id;
+
+        this.allSelection = Array.isArray(list) ? list : [];
+
+        this.$nextTick(() => {
+          const table = this.$refs.table;
+          if (!table) return;
+
+          this.allSelection.forEach((item) => {
+            if (item.isNew == 1) {
+              table.toggleRowSelection(item, true);
+            }
+          });
+        });
+      },
+
+      isRowSelectable(row) {
+        const existsOld = this.allSelection.some(
+          (item) => item.id === row.id && item.isNew !== 1
+        );
+        return !existsOld;
+      },
+
+      cancel() {
+        this.dispatchVisible = false;
+      },
+
+      reload(where) {
+        this.$refs.table.reload({ pageNum: 1, where: where });
+      },
+
+      datasource({ page, limit }) {
+        return getFactoryworkstation({
+          pageNum: page,
+          size: limit,
+          workCenterId: this.workCenterId
+        });
+      },
+
+      handleSelectionChange(val) {
+        // this.allSelection = val;
+      },
+
+      comfirm() {
+        if (this.selection.length == 0) {
+          return this.$message.warning('请选择一条数据');
+        }
+
+        this.$emit('chooseStationList', this.selection, this.index);
+        this.dispatchVisible = false;
+      }
+    }
+  };
+</script>
+
+<style></style>

+ 49 - 1
src/views/produceOrder/components/releaseDialog/index.vue

@@ -132,6 +132,15 @@
                   >
                     保存
                   </el-button>
+
+                  <el-button
+                    type="success"
+                    @click="addStation(item, index)"
+                    :loading="toolbarLoading"
+                    :disabled="!item.isDisable || item.assignType == 3"
+                  >
+                    添加工位
+                  </el-button>
                 </div>
                 <div
                   style="margin-left: 50px; display: inline-block"
@@ -265,6 +274,11 @@
     <!--      </el-button-->
     <!--      >-->
     <!--    </div>-->
+
+    <choose-station
+      ref="chooseStationRef"
+      @chooseStationList="chooseStationList"
+    ></choose-station>
   </ele-modal>
 </template>
 
@@ -285,9 +299,10 @@
     listByFactoryId
   } from '@/api/mainData/index.js';
   import { getUserInfo } from '@/api/produceOrder/index.js';
+  import chooseStation from '../chooseStation.vue';
 
   export default {
-    components: {},
+    components: { chooseStation },
     props: {
       current: {
         type: Object,
@@ -698,6 +713,36 @@
         } catch (err) {}
       },
 
+      //添加工位
+      addStation(item, index) {
+        this.$refs.chooseStationRef.open(
+          this.form.workCenterId,
+          item.list,
+          index
+        );
+      },
+
+      chooseStationList(list, index) {
+        const process = this.processList?.[index];
+
+        if (!process) {
+          console.warn(`processList[${index}] 不存在`);
+          return;
+        }
+
+        const oldList = structuredClone(
+          Array.isArray(process.list) ? process.list : []
+        );
+
+        list.forEach((item) => {
+          item.isNew = 1;
+        });
+
+        const newList = structuredClone(Array.isArray(list) ? list : []);
+
+        this.$set(this.processList[index], 'list', [...oldList, ...newList]);
+      },
+
       // // 选择工作中心
       // async changeWork(e) {
       //   this.form.workCenterId = e;
@@ -787,6 +832,9 @@
         //       this.$message.error(err.message);
         //     });
         // }
+
+        console.log(id, this.current.taskInstanceId, '88855');
+
         await listByFirstTaskId(id ? id : this.current.taskInstanceId)
           .then((res) => {
             this.stationList = res;

+ 3 - 2
vue.config.js

@@ -34,8 +34,8 @@ module.exports = {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18086',
-        target: 'http://192.168.1.251:18086',
-        // target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.251:18086',
+        target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.116:18086', // 赵沙金
         // target: 'http://192.168.1.251:18086', // 开发环境
         // target: 'http://192.168.1.103:18086',192.168.1.116
@@ -46,6 +46,7 @@ module.exports = {
         // target: 'http://192.168.1.251:18186', // 测试环境
         // target: 'http://192.168.1.251:18087',
         // target: 'http://116.163.22.90:86/api', // 嘉实生产
+        // target: 'http://aiot.zoomwin.com.cn:51001/api',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''