快乐的昕的电脑
2025-10-24 8e37b959738eaa0e2a92b1b51a4eaf0429aa0e2b
pages/index.vue
@@ -15,7 +15,7 @@
            刀具管理
         </view>
         <view class="tab-item" :class="{ active: currentTab === 4 }" @click="changeTab(4)">
            打码报工
            生产报工
         </view>
         <view class="tab-item" :class="{ active: currentTab === 1 }" @click="changeTab(1)">
            开工完工
@@ -127,8 +127,7 @@
               <view>
                  <text style="color: red;">
                     说明:初始状态是,按齿轮机查出所有的未完工的工单。用选择框标识机器要开工的工单。
                     只能同时开工一个工单。选择完成,点击保存选择。系统保留选中的工单。
                     说明:只能同时开工一个工单。选择完成,点击保存选择。系统保留选中的工单。
                     如果要重选,点击清空重选功能。
                  </text>
               </view>
@@ -277,6 +276,9 @@
         return {
                orderStatus: '', // 默认全部
            currentTab: 7,
                productCode: '', // 产品编码
                productSpec: '', // 产品规格
            machineList: [],
@@ -633,29 +635,25 @@
            });
         },
         isShowTab() {
            isShowTab() {
                if (this.isShowTableData.length > 0) {
                    uni.showToast({
                        title: '已有正在操作的工单,不能再次选择',
                        icon: 'error',
                        duration: 2000
                    });
                    return;
                }
            if (this.isShowTableData.length > 0) {
               uni.showToast({
                  title: '已有正在操作的工单,不能再次选择',
                  //将值设置为 success 或者直接不用写icon这个参数
                  icon: 'error',
                  //显示持续时间为 2秒
                  duration: 2000
               });
               return;
            }
            this.isShow = true;
            this.engineeringNo = null;
            this.tableData = [];
                this.isShow = true;
                // 默认选中“待开工”
                this.engineeringNo = '待开工';
                this.tableData = [];
                // 下拉框只显示工单状态
                this.engineeringNoMapList = ['待开工', '未开工', '完工', '暂停'];
                // 默认显示全部工单
                this.getWomdaa();
         },
                this.engineeringNoMapList = ['待开工', '未开工', '开工', '暂停', '完工'];
                // 默认显示“待开工”工单
                this.getWomdaaByStatus();
            },
            // 下拉框选中后,按状态筛选工单
            onEngineeringNoChange(status) {
                this.engineeringNo = status;
@@ -692,6 +690,8 @@
         toDetail(item) {
            this.orderId = item.id;
            this.selectedOrder = item.daa001;
                this.productCode = item.daa002; // 产品编码
                this.productSpec = item.daa004; // 产品规格
            this.currentTab = 0;
         }
      },