| | |
| | | <view class="section card"> |
| | | <uni-table border stripe emptyText="暂无更多数据" @selection-change="selectionChange"> |
| | | <uni-tr> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 100px;">工序</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 170px;">工单号</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 150px;">产品编码</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 190px;">产品名称</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 190px;">规格</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 80px;">已生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 80px;">未生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 80px;">派工数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 80px;">工单数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 90px;">工单状态</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 90px;">报工人</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 90px;">选择</uni-th> |
| | | <uni-th align="center" class="th" style="width: 100px;">工序</uni-th> |
| | | <uni-th align="center" class="th" style="width: 170px;">工单号</uni-th> |
| | | <uni-th align="center" class="th" style="width: 150px;">产品编码</uni-th> |
| | | <uni-th align="center" class="th" style="width: 190px;">产品名称</uni-th> |
| | | <uni-th align="center" class="th" style="width: 190px;">规格</uni-th> |
| | | <uni-th align="center" class="th" style="width: 80px;">已生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="width: 80px;">未生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="width: 80px;">派工数量</uni-th> |
| | | <uni-th align="center" class="th" style="width: 80px;">工单数量</uni-th> |
| | | <uni-th align="center" class="th" style="width: 90px;">工单状态</uni-th> |
| | | <uni-th align="center" class="th" style="width: 90px;">报工人</uni-th> |
| | | <uni-th align="center" class="th" style="width: 90px;">选择</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in isShowTableData" :key="index"> |
| | | <uni-td align="center"> |
| | |
| | | <uni-td> |
| | | <view class="uni-group"> |
| | | <button class="select-btn" type="default" @click="toDetail(item)"> |
| | | 选择 |
| | | 转到主界面 |
| | | </button> |
| | | </view> |
| | | </uni-td> |
| | |
| | | <view class="popup"> |
| | | <view class="form-row"> |
| | | <view style="display: flex; align-items: center;"> |
| | | <label style="float: left;margin-top: 18px;">点击按钮筛选工单状态:</label> |
| | | <label style="float: left;margin-top: 18px;font-size: 22px;">点击按钮筛选工单状态:</label> |
| | | <superwei-combox :candidates="engineeringNoMapList" placeholder="请选择" v-model="engineeringNo" |
| | | @select="onEngineeringNoChange" class="picker" |
| | | style="padding: 7px 46px;width: 650px;"></superwei-combox> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <div style="height: 500px; overflow: auto;"> |
| | | <div style="height: 450px; overflow: auto;"> <!-- 调整高度为380px,为底部按钮留出更多空间 --> |
| | | <table> |
| | | |
| | | <view class="section card"> |
| | | <uni-table ref="table" type="selection" border stripe emptyText="暂无更多数据" |
| | | class="large-selection-table" @selection-change="selectionChange"> |
| | | <uni-tr> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 100px;">工序</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 200px;">工单号</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 150px;">产品编码</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 240px;">产品名称</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 200px;">规格</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 150px;">已生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 150px;">未生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 150px;">派工数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 150px;">工单数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 90px;">工单状态</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 90px;">报工人</uni-th> |
| | | <!--<uni-th align="center" class="th" style="color: #FFFFFF; width: 100px;">选择</uni-th>--> |
| | | <uni-th align="center" class="th" style="width: 100px;">工序</uni-th> |
| | | <uni-th align="center" class="th" style="width: 200px;">工单号</uni-th> |
| | | <uni-th align="center" class="th" style="width: 150px;">产品编码</uni-th> |
| | | <uni-th align="center" class="th" style="width: 240px;">产品名称</uni-th> |
| | | <uni-th align="center" class="th" style="width: 200px;">规格</uni-th> |
| | | <uni-th align="center" class="th" style="width: 150px;">已生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="width: 150px;">未生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="width: 150px;">派工数量</uni-th> |
| | | <uni-th align="center" class="th" style="width: 150px;">工单数量</uni-th> |
| | | <uni-th align="center" class="th" style="width: 90px;">工单状态</uni-th> |
| | | <uni-th align="center" class="th" style="width: 90px;">报工人</uni-th> |
| | | <!-- <uni-th align="center" class="th" style="width: 126px;">选择</uni-th> --> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in tableData" |
| | | :key="index" |
| | |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.staffName" /><!--报工人--> |
| | | </uni-td> |
| | | <uni-td> |
| | | <!-- <view class="uni-group"> |
| | | <button class="select-btn" type="default" @click="toDetail(item)"> |
| | | 转到主界面 |
| | | </button> |
| | | </view> --> |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | |
| | | selectedIndexs: [], |
| | | |
| | | isShow: false, |
| | | |
| | | // 自动跳转相关 |
| | | autoRedirectTimer: null, |
| | | autoRedirectTime: 5 * 60 * 1000, // 5分钟 |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | onShow() { |
| | | this.refresh(); |
| | | this.resetAutoRedirectTimer(); |
| | | }, |
| | | methods: { |
| | | onRowClick(index) { |
| | | this.selectedIndexs = [index]; // 单选 |
| | | // 手动触发 selectionChange 以同步复选框 |
| | | this.selectionChange({ detail: { index } }); |
| | | // 重置自动跳转计时器 |
| | | this.resetAutoRedirectTimer(); |
| | | }, |
| | | |
| | | // 重置自动跳转计时器 |
| | | resetAutoRedirectTimer() { |
| | | // 清除现有的定时器 |
| | | if (this.autoRedirectTimer) { |
| | | clearTimeout(this.autoRedirectTimer); |
| | | this.autoRedirectTimer = null; |
| | | } |
| | | |
| | | // 除了主页(0)、工单选择页(7)、生产报工页(4)之外的页面才设置自动跳转 |
| | | if (this.currentTab !== 0 && this.currentTab !== 7 && this.currentTab !== 4) { |
| | | this.autoRedirectTimer = setTimeout(() => { |
| | | // 跳转回主页 |
| | | this.currentTab = 0; |
| | | // 显示提示信息 |
| | | uni.showToast({ |
| | | title: '页面超时,自动返回主页', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | }, this.autoRedirectTime); |
| | | } |
| | | }, |
| | | checkForUpdate() { |
| | | this.$post({ |
| | |
| | | if (index === 7) { |
| | | this.refresh(); |
| | | } |
| | | // 重置自动跳转计时器 |
| | | this.resetAutoRedirectTimer(); |
| | | console.log(index); |
| | | }, |
| | | onMachineChange(event) { |
| | |
| | | background-color: #00A2E9; |
| | | color: white; |
| | | border: none; |
| | | font-size: 1.5vw; |
| | | font-size: 22px; |
| | | border-radius: 5px; |
| | | } |
| | | |
| | |
| | | background-color: #fff; |
| | | color: #007aff; |
| | | cursor: pointer; |
| | | font-size: 1.8vw; |
| | | /* Increased font size */ |
| | | font-size: 22px; |
| | | font-weight: 500; |
| | | transition: background-color 0.3s, color 0.3s; |
| | | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); |
| | | } |
| | | |
| | | .tab-item.active { |
| | | background-color: #007aff; |
| | | color: #fff; |
| | | font-weight: bold; |
| | | font-weight: 600; |
| | | box-shadow: 0 4px 8px rgba(0, 122, 255, 0.3); |
| | | } |
| | | |
| | | .content { |
| | | flex: 1; |
| | | padding: 1vh 1vw; |
| | | background-color: white; |
| | | font-size: 1.5vw; |
| | | /* Increased font size for content */ |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .picker { |
| | |
| | | } |
| | | |
| | | .th { |
| | | background-color: lightskyblue; |
| | | background-color: white; |
| | | color: black; |
| | | height: 6vh; |
| | | font-size: 2vw; |
| | | font-size: 2.6vw; /* 字体更大 */ |
| | | /* Increased font size for table headers */ |
| | | font-size: 22px; |
| | | font-weight: 600; |
| | | border: 1px solid #555; |
| | | padding: 6px 8px; |
| | | text-align: center; |
| | | white-space: normal; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | /* 主表格边框样式 */ |
| | | uni-table { |
| | | border: 2px solid #d00 !important; |
| | | border-collapse: separate !important; |
| | | border-spacing: 0 !important; |
| | | } |
| | | |
| | | .uni-th, .uni-td { |
| | | border: 1px solid #555 !important; |
| | | position: relative !important; |
| | | z-index: 1 !important; |
| | | } |
| | | |
| | | .form-input { |
| | |
| | | vertical-align: middle; |
| | | max-width: 180px; |
| | | overflow-wrap: break-word; |
| | | font-size: 1.8vw; |
| | | font-size: 22px; |
| | | padding: 6px 8px; |
| | | background-color: transparent; /* 设置背景为透明 */ |
| | | } |
| | | |
| | | /* 底部保存和取消按钮 */ |
| | |
| | | justify-content: space-around; |
| | | margin-bottom: 2vh; |
| | | padding: 2vh 1vw; |
| | | margin-top: 160px; // 原来是40px,改成80px,按钮整体下移 |
| | | margin-top: 20px; // 减小顶部边距,确保按钮在弹窗内正确显示 |
| | | } |
| | | |
| | | .save-btn, |
| | |
| | | padding: 1.5vh; |
| | | background-color: #00a2e9; |
| | | color: white; |
| | | font-size: 1.8vw; |
| | | /* Increased button font size */ |
| | | font-size: 22px; |
| | | font-weight: 500; |
| | | border: none; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | border-radius: 4px; |
| | | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .cancel-btn { |
| | | background-color: #00A2E9; |
| | | color: white; |
| | | } |
| | | |
| | | .overlay { |
| | |
| | | |
| | | .popup { |
| | | background-color: #fff; |
| | | padding: 2vh; |
| | | padding: 2vh 2vh 8vh 2vh; // 增加底部内边距,为按钮留出空间 |
| | | border: 1px solid #ccc; |
| | | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
| | | width: 98vw; // 原来是 90vw,改成 98vw |
| | | height: 85vh; |
| | | width: 90.16vw; // 原来的98vw缩小8% (98vw * 0.92) |
| | | height: 68vh; // 原来的85vh缩小20% (85vh * 0.8) |
| | | font-size: 1.6vw; |
| | | box-sizing: border-box; // 确保内边距不影响总尺寸 |
| | | } |
| | | |
| | | .print-btn { |
| | |
| | | margin-top: 4px; |
| | | margin-left: 10px; |
| | | text-align: center; |
| | | font-size: 100%; |
| | | color: black; |
| | | font-size: 22px; |
| | | color: white; |
| | | background-color: #00A2E9; |
| | | padding: 0px 90px; |
| | | border: 2px solid #ccc; |
| | | border: 2px solid #00A2E9; |
| | | cursor: pointer; |
| | | border-radius: 0.8vw; |
| | | } |
| | |
| | | |
| | | @media screen and (max-width: 1920px) { |
| | | .tab-item { |
| | | font-size: 1.6vw; |
| | | font-size: 22px; |
| | | } |
| | | |
| | | .content { |
| | | padding: 1vw; |
| | | font-size: 1.5vw; |
| | | font-size: 22px; |
| | | } |
| | | |
| | | .form-input { |
| | | font-size: 1.6vw; |
| | | font-size: 22px; |
| | | } |
| | | } |
| | | |
| | |
| | | vertical-align: middle; // 垂直居中 |
| | | max-width: 180px; // 保持单元格最大宽度 |
| | | overflow-wrap: break-word; // 兼容性更好 |
| | | background-color: transparent; /* 设置背景为透明 */ |
| | | } |
| | | |
| | | // 放大弹窗内表格字体(表头和内容) |
| | | .popup .large-selection-table, |
| | | // 弹窗内表格样式与生产报工页面历史报工记录表格一致 |
| | | .popup .large-selection-table .uni-th, |
| | | .popup .large-selection-table .uni-td, |
| | | .popup .large-selection-table input.form-input { |
| | | font-size: 2.2vw !important; // 可根据实际需求调整 |
| | | .popup .large-selection-table .uni-td { |
| | | padding: 6px 8px; |
| | | text-align: center; |
| | | white-space: normal; |
| | | word-break: break-all; |
| | | font-size: 22px; |
| | | background-color: transparent; /* 设置背景为透明 */ |
| | | border: 1px solid #555 !important; |
| | | } |
| | | |
| | | .popup .large-selection-table .uni-th { |
| | | background-color: white; |
| | | color: black; |
| | | font-weight: 600; |
| | | font-size: 22px; |
| | | } |
| | | |
| | | /* 弹窗表格外框线 */ |
| | | .popup .large-selection-table { |
| | | border: 2px solid #d00 !important; |
| | | border-collapse: separate !important; |
| | | border-spacing: 0 !important; |
| | | } |
| | | |
| | | .select-btn { |
| | | width: 180px; // 更宽 |
| | | height: 80px; // 更高 |
| | | font-size: 1.8vw; // 字体也略大 |
| | | width: 150px; // 原来的70% (180px * 0.7) |
| | | height: 75px; // 原来的65% (80px * 0.65) |
| | | font-size: 22px; // 字体也略大 |
| | | //font-weight: 200; |
| | | border-radius: 10px; |
| | | background-color: #f5f5f5; |
| | | color: #007aff; |
| | | border: 2px solid #007aff; |
| | | background-color: #00A2E9; |
| | | color: white; |
| | | border: 2px solid #00A2E9; |
| | | margin: 0 auto; |
| | | display: block; |
| | | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .top-section { |
| | |
| | | |
| | | .order-label { |
| | | font-family: fantasy; |
| | | font-size: 33px; |
| | | font-size: 22px; |
| | | margin-top: 20px; |
| | | margin-right: 10px; |
| | | float: none; |
| | |
| | | .th, |
| | | .uni-th, |
| | | th { |
| | | font-size: 1.7vw !important; |
| | | font-weight: bold; |
| | | letter-spacing: 2px; |
| | | font-size: 22px !important; |
| | | color: black !important; |
| | | font-weight: 600; |
| | | letter-spacing: 1px; |
| | | } |
| | | |
| | | .popup .large-selection-table .th, |
| | | .popup .large-selection-table .uni-th, |
| | | .popup .large-selection-table th { |
| | | font-size: 32px !important; |
| | | font-size: 22px !important; |
| | | color: black !important; |
| | | } |
| | | |
| | | /* 针对1280x800的平板使用媒体查询进行适配 */ |
| | |
| | | |
| | | .save-btn, |
| | | .cancel-btn { |
| | | font-size: 1.6vw; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .inp { |
| | | width: 85%; |
| | | font-size: 20px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .status-block p { |
| | | font-size: 20px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .uni-tr, |
| | | .uni-td { |
| | | font-size: 20px; |
| | | font-size: 22px; |
| | | } |
| | | } |
| | | |