| | |
| | | <template> |
| | | <template> |
| | | |
| | | <view class="page-container"> |
| | | <!-- 顶部操作条统一展示机台信息与快捷操作 --> |
| | | <view class="top-bar"> |
| | | <view class="top-bar__title">浜х嚎鎵ц鎺у埗鍙?/view> |
| | | <view class="top-bar__actions inline-gap"> |
| | | <view class="device-chip"> |
| | | <text class="device-chip__label">褰撳墠鏈哄彴</text> |
| | | <text class="device-chip__value">{{ machineName || '鏈粦瀹? }}</text> |
| | | </view> |
| | | <button class="btn btn--secondary" @click="refresh">鍒锋柊</button> |
| | | </view> |
| | | </view> |
| | | <!-- 横向标签导航,保持各业务页样式一致 --> |
| | | <view class="tab-strip"> |
| | | <view class="tab-strip__item" :class="{ 'tab-strip__item--active': currentTab === 7 }" @click="changeTab(7)"> |
| | | <view> |
| | | <view class="tab-bar"> |
| | | <view class="tab-item" :class="{ active: currentTab === 7 }" @click="changeTab(7)"> |
| | | 工单选择 |
| | | </view> |
| | | <view class="tab-strip__item" :class="{ 'tab-strip__item--active': currentTab === 0 }" @click="changeTab(0)"> |
| | | <view class="tab-item" :class="{ active: currentTab === 0 }" @click="changeTab(0)"> |
| | | 主界面 |
| | | </view> |
| | | <view class="tab-strip__item" :class="{ 'tab-strip__item--active': currentTab === 3 }" @click="changeTab(3)"> |
| | | <view class="tab-item" :class="{ active: currentTab === 2 }" @click="changeTab(2)"> |
| | | 上刀下刀 |
| | | </view> |
| | | <view class="tab-item" :class="{ active: currentTab === 3 }" @click="changeTab(3)"> |
| | | 调机送检 |
| | | </view> |
| | | <view class="tab-strip__item" :class="{ 'tab-strip__item--active': currentTab === 2 }" @click="changeTab(2)"> |
| | | 刀具管理 |
| | | </view> |
| | | <view class="tab-strip__item" :class="{ 'tab-strip__item--active': currentTab === 4 }" @click="changeTab(4)"> |
| | | <view class="tab-item" :class="{ active: currentTab === 4 }" @click="changeTab(4)"> |
| | | 生产报工 |
| | | </view> |
| | | <!-- <view class="tab-strip__item" :class="{ 'tab-strip__item--active': currentTab === 1 }" @click="changeTab(1)"> |
| | | <view class="tab-item" :class="{ active: currentTab === 1 }" @click="changeTab(1)"> |
| | | 开工完工 |
| | | </view> --> |
| | | <view class="tab-strip__item" :class="{ 'tab-strip__item--active': currentTab === 5 }" @click="changeTab(5)"> |
| | | </view> |
| | | <view class="tab-item" :class="{ active: currentTab === 5 }" @click="changeTab(5)"> |
| | | e-SOP |
| | | </view> |
| | | <view class="tab-strip__item" :class="{ 'tab-strip__item--active': currentTab === 6 }" @click="changeTab(6)"> |
| | | <view class="tab-item" :class="{ active: currentTab === 6 }" @click="changeTab(6)"> |
| | | 工艺参数 |
| | | </view> |
| | | <view class="tab-strip__item" :class="{ 'tab-strip__item--active': currentTab === 9 }" @click="changeTab(9)"> |
| | | <view class="tab-item" :class="{ active: currentTab === 9 }" @click="changeTab(9)"> |
| | | 设备点检 |
| | | </view> |
| | | <!-- <view class="tab-strip__item" :class="{ 'tab-strip__item--active': currentTab === 8 }" @click="changeTab(8)"> |
| | | 打印机设置 |
| | | </view> --> |
| | | <!-- <view class="tab-item" :class="{ active: currentTab === 8 }" @click="changeTab(8)"> |
| | | 打印机设置 |
| | | </view> --> |
| | | |
| | | </view> |
| | | <view class="font"></view> |
| | | <scroll-view class="page-scroll" scroll-y="true"> |
| | | <view v-if="currentTab === 7" class="tab-content content-panel"> |
| | | <scroll-view class="content"> |
| | | <view v-if="currentTab === 7" class="tab-content"> |
| | | <view class="content"> |
| | | <!--<view> |
| | | <view class="top-right"> |
| | | <button class="refresh-btn" @click="refresh">刷新</button> |
| | | </view> |
| | | <view> |
| | | <h4>一台机台只能选择一条工单(多选默认为最后一条)</h4> |
| | | </view>--> |
| | | </view> |
| | | <view class="section top-section"> |
| | | <!--显示当前机台--> |
| | | <view class="form-row"> |
| | | <view> |
| | | <!-- <label style="float: left;font-family: fantasy;font-size: 33px;margin-top: 20px">第一步选择机台:</label> --> |
| | | <!-- <superwei-combox :candidates="machineList" placeholder="请选择" v-model="machineName" |
| | | @select="onMachineChange" class="picker"></superwei-combox> --> |
| | | <input v-model="machineName" disabled="true" type="text" style="float: left;font-family: fantasy;font-size: 33px;margin-top: 20px" /> |
| | | <input v-model="machineName" |
| | | disabled="true" |
| | | type="text" |
| | | class="machine-name-box" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-row"> |
| | | <view> |
| | | <label style="float: left;font-family: fantasy;font-size: 33px;margin-top: 20px;">第一步选择工单:</label> |
| | | <button class="btn btn--primary choose-order-btn" @click="isShowTab">选择工单</button> |
| | | <button class="print-btn" @click="isShowTab">选择工单</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- <!– 中部:运行状态--> |
| | | <view class="section card"> |
| | | <uni-table class="table" border stripe emptyText="暂无更多数据" @selection-change="selectionChange"> |
| | | <uni-tr class="table__head"> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF">工序</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF">工单号/uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF">产品编码</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF">产品名称</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF">规格</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF;width: 100px;">已生产数量</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF;width: 100px;">未生产数量</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF;width: 100px;">派工数量</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF;width: 100px;">工单数量</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF;width: 100px;">工单状态</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF;width: 100px;">报工人</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF">选择</uni-th> |
| | | <uni-table border stripe emptyText="暂无更多数据" @selection-change="selectionChange"> |
| | | <uni-tr> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 140px;">工序</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 180px;">工单号</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 220px;">产品编码</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 180px;">产品名称</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 180px;">规格</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 120px;">已生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 120px;">未生产数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 120px;">派工数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 120px;">工单数量</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 120px;">工单状态</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 120px;">报工人</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 120px;">选择</uni-th> |
| | | </uni-tr> |
| | | <uni-tr class="table__row" v-for="(item, index) in isShowTableData" :key="index"> |
| | | <uni-td align="center" class="table__cell"> |
| | | <uni-tr v-for="(item, index) in isShowTableData" :key="index"> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.procName" /><!--工序--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa001" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa001" /><!--工单号--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa002" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa002" /><!--产品编码--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003" /><!--产品名称--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa004" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa004" /><!--规格--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa011" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa011" /><!--已生产数量--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" :value="(item.daa008 || 0) - (item.daa011 || 0)" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" :value="(item.daa008 || 0) - (item.daa011 || 0)" /><!--未生产数量--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--派工数量--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--工单数量--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa018" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa018" /><!--工单状态--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.staffName" /> |
| | | <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 type="default" @click="toDetail(item)"> |
| | | <button class="select-btn" type="default" @click="toDetail(item)"> |
| | | 选择 |
| | | </button> |
| | | </view> |
| | |
| | | |
| | | <view> |
| | | <!--<text style="color: red;"> |
| | | 说明:只能同时开工一个工单。选择完成,点击保存选择。系统保留选中的工单。 |
| | | 如果要重选,点击清空重选功能。 |
| | | </text>--> |
| | | 说明:只能同时开工一个工单。选择完成,点击保存选择。系统保留选中的工单。 |
| | | 如果要重选,点击清空重选功能。 |
| | | </text>--> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view v-if="currentTab === 0" class="tab-content content-panel"> |
| | | <view v-if="currentTab === 0" class="tab-content"> |
| | | <WorkOrder :orderId="orderId" :orderNo="selectedOrder" :machineNo="machineNo" |
| | | :deviceNumber="machineName" /> |
| | | </view> |
| | | <view v-if="currentTab === 1" class="tab-content content-panel"> |
| | | <view v-if="currentTab === 1" class="tab-content"> |
| | | <!-- <!– 调用 WorkOrderStatus 组件 –>--> |
| | | <WorkOrderStatus :orderId="orderId" :orderNo="selectedOrder" :machineNo="machineNo" /> |
| | | </view> |
| | | <view v-if="currentTab === 2" class="tab-content content-panel"> |
| | | <view v-if="currentTab === 2" class="tab-content"> |
| | | <!-- <!– 调用 mold 组件 –>--> |
| | | <mold :orderId="orderId" :orderNo="selectedOrder" :machineNo="machineNo" /> |
| | | </view> |
| | | <view v-if="currentTab === 3" class="tab-content content-panel"> |
| | | <view v-if="currentTab === 3" class="tab-content"> |
| | | <!-- <!– 调用 mold 组件 –>--> |
| | | <machine :orderId="orderId" :orderNo="selectedOrder" :machineNo="machineNo" /> |
| | | </view> |
| | | <view v-if="currentTab === 4" class="tab-content content-panel"> |
| | | <view v-if="currentTab === 4" class="tab-content"> |
| | | <!-- 调用 mold 组件 --> |
| | | <WorkOrderPrint :orderId="orderId" :orderNo="selectedOrder" :machineNo="machineNo" /> |
| | | </view> |
| | | <view v-if="currentTab === 8" class="tab-content content-panel"> |
| | | <view v-if="currentTab === 8" class="tab-content"> |
| | | <!-- 调用 mold 组件 --> |
| | | <PrintInit :orderId="orderId" :orderNo="selectedOrder" :machineNo="machineNo" /> |
| | | </view> |
| | | <view v-if="currentTab === 5" class="tab-content content-panel"> |
| | | <view v-if="currentTab === 5" class="tab-content"> |
| | | <PDFShow :orderId="orderId" :orderNo="selectedOrder" :machineNo="machineNo" /> |
| | | </view> |
| | | <view v-if="currentTab === 6" class="tab-content content-panel"> |
| | | <view v-if="currentTab === 6" class="tab-content"> |
| | | <Technology :orderId="orderId" :orderNo="selectedOrder" :machineNo="machineNo" /> |
| | | </view> |
| | | <view v-if="currentTab === 9" class="tab-content content-panel"> |
| | | <view v-if="currentTab === 9" class="tab-content"> |
| | | <!-- 设备点检视图 --> |
| | | <EquipmentInspection :machineNo="machineNo" /> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | |
| | | <!-- 弹窗下拉框只显示工单状态 --> |
| | | <view v-if="isShow" class="overlay"> |
| | | <view class="popup"> |
| | | <view class="form-row"> |
| | | <view> |
| | | <label style="float: left;margin-top: 18px;">选择工单状态:</label> |
| | | <view style="display: flex; align-items: center;"> |
| | | <label style="float: left;margin-top: 18px;">点击按钮筛选工单状态:</label> |
| | | <superwei-combox :candidates="engineeringNoMapList" placeholder="请选择" v-model="engineeringNo" |
| | | @select="onEngineeringNoChange" class="picker" |
| | | style="padding: 7px 46px;width: 650px;"></superwei-combox> |
| | | <span style="margin-left: 20px; color: #ff6600; font-size: 18px;">多选时只保留最后一条工单</span> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | |
| | | <view class="section card"> |
| | | <uni-table ref="table" type="selection" border stripe emptyText="暂无更多数据" |
| | | @selection-change="selectionChange"> |
| | | <uni-tr class="table__head"> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF">工序</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF">工单号</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF">产品编码</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF">产品名称</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF">规格</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF;width: 100px;">已生产数量</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF;width: 100px;">未生产数量</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF;width: 100px;">派工数量</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF;width: 100px;">工单数量</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF;width: 100px;">工单状态</uni-th> |
| | | <uni-th align="center" class="th table__cell" style="color: #FFFFFF;width: 100px;">报工人</uni-th> |
| | | 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: 120px;">工单号</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 120px;">产品编码</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 260px;">产品名称</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 260px;">规格</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: 100px;">工单状态</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 100px;">报工人</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF; width: 100px;">选择</uni-th> |
| | | </uni-tr> |
| | | <uni-tr class="table__row" v-for="(item, index) in tableData" :key="index"> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.procName" /> |
| | | <uni-tr v-for="(item, index) in tableData" |
| | | :key="index" |
| | | :class="{'row-selected': selectedIndexs.includes(index)}" |
| | | @click="onRowClick(index)" |
| | | style="cursor: pointer;"> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.procName" /><!--工序--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa001" /> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa002" /> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003" /><!--产品名称--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa004" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa004" /><!--规格--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa011" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa011" /><!--已生产数量--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" :value="(item.daa008 || 0) - (item.daa011 || 0)" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" :value="(item.daa008 || 0) - (item.daa011 || 0)" /><!--未生产数量--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--派工数量--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--工单数量--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa018" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa018" /><!--工单状态--> |
| | | </uni-td> |
| | | <uni-td align="center" class="table__cell"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.staffName" /> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.staffName" /><!--报工人--> |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import WorkOrderStatus from '../components/WorkOrderStatus.vue'; |
| | | import WorkOrderStatus from '../components/WorkOrderStatus.vue'; // 确保路径正确 |
| | | import UniTable from "../uni_modules/uni-table/components/uni-table/uni-table.vue"; |
| | | import Mold from "../components/mold.vue"; |
| | | import Machine from "../components/machine.vue"; |
| | |
| | | this.refresh(); |
| | | }, |
| | | methods: { |
| | | onRowClick(index) { |
| | | this.selectedIndexs = [index]; // 单选 |
| | | }, |
| | | checkForUpdate() { |
| | | this.$post({ |
| | | url: "/DevMachine/getAppUpgradeInfo", |
| | |
| | | this.getWomdaaIsShow(); |
| | | }, |
| | | getPrintInfo() { |
| | | var mac = "ac:f4:2c:20:0d:b4"; |
| | | var mac = ""; |
| | | |
| | | mac = "74:24:ca:4f:b7:9b"; |
| | | this.$post({ |
| | |
| | | |
| | | this.getWomdaaIsShow(); |
| | | }); |
| | | return; |
| | | |
| | | |
| | | if (plus.os.name == "Android") { |
| | |
| | | } |
| | | return str; |
| | | }, |
| | | cancel() { |
| | | |
| | | if (!this.machineNo) { |
| | | return; |
| | | } |
| | | cancel() { |
| | | if (!this.machineNo) { |
| | | return; |
| | | } |
| | | |
| | | let editDate = this.formatDate(new Date()); |
| | | // 直接用 flag 判断 |
| | | if (this.hasBindedCutterFlag) { |
| | | uni.showToast({ |
| | | title: '当前工单已绑定刀具,不能清空重选', |
| | | icon: 'error', |
| | | duration: 2000 |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | this.selectedIndexs = []; |
| | | let editDate = this.formatDate(new Date()); |
| | | this.selectedIndexs = []; |
| | | |
| | | this.$post({ |
| | | url: "/MesOrderSelect/Remove", |
| | | data: { |
| | | machineNo: this.machineNo, |
| | | editDate: editDate |
| | | }, |
| | | }).then(res => { |
| | | if (res.data.tbBillList > 0) { |
| | | this.isShowTableData = []; |
| | | } |
| | | }); |
| | | }, |
| | | this.$post({ |
| | | url: "/MesOrderSelect/Remove", |
| | | data: { |
| | | machineNo: this.machineNo, |
| | | editDate: editDate |
| | | }, |
| | | }).then(res => { |
| | | if (res.data.tbBillList > 0) { |
| | | this.isShowTableData = []; |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | formatDate(date) { |
| | | let year = date.getFullYear(); // 获取年份 |
| | | let month = String(date.getMonth() + 1).padStart(2, '0'); // 获取月份并补零 |
| | |
| | | }) |
| | | }, |
| | | //获取表格的数据源 |
| | | getWomdaaIsShow() { |
| | | this.$post({ |
| | | url: "/Womdaa/GetWomdaasByShow", |
| | | data: { |
| | | machineNo: this.machineNo, |
| | | } |
| | | }).then(res => { |
| | | this.isShowTableData = res.data.tbBillList; |
| | | getWomdaaIsShow() { |
| | | this.$post({ |
| | | url: "/Womdaa/GetWomdaasByShow", |
| | | data: { |
| | | machineNo: this.machineNo, |
| | | } |
| | | }).then(res => { |
| | | this.isShowTableData = res.data.tbBillList; |
| | | |
| | | if (this.isShowTableData.length == 1) { |
| | | uni.setStorageSync('daa001', this.isShowTableData[0].daa001); |
| | | uni.setStorageSync('id', this.isShowTableData[0].id); |
| | | //this.toDetail(this.isShowTableData[0]); |
| | | } |
| | | }); |
| | | }, |
| | | // 只判断第一条(只允许一条工单) |
| | | const order = this.isShowTableData[0]; |
| | | let hasBindedCutter = false; |
| | | if (order) { |
| | | hasBindedCutter = |
| | | (order.outToolId && order.outToolId.toString().trim() !== '') || |
| | | (order.outToolCode && order.outToolCode.trim() !== '') || |
| | | (order.outToolName && order.outToolName.trim() !== ''); |
| | | } |
| | | // 存储到 data 变量 |
| | | this.hasBindedCutterFlag = hasBindedCutter; |
| | | |
| | | if (this.isShowTableData.length == 1) { |
| | | uni.setStorageSync('daa001', this.isShowTableData[0].daa001); |
| | | uni.setStorageSync('id', this.isShowTableData[0].id); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | isShowTab() { |
| | | if (this.isShowTableData.length > 0) { |
| | |
| | | |
| | | this.isShow = true; |
| | | // 默认选中“待开工” |
| | | this.engineeringNo = '待开工'; |
| | | this.engineeringNo = '待开工、未开工、暂停'; |
| | | this.tableData = []; |
| | | // 下拉框只显示工单状态 |
| | | this.engineeringNoMapList = ['待开工', '未开工', '开工', '暂停', '完工']; |
| | | // 下拉框只显示合并后的状态和其它状态 |
| | | this.engineeringNoMapList = [ |
| | | '待开工、未开工、暂停', |
| | | '开工', |
| | | '完工' |
| | | ]; |
| | | // 默认显示“待开工”工单 |
| | | this.getWomdaaByStatus(); |
| | | }, |
| | |
| | | // 按工单状态筛选工单 |
| | | getWomdaaByStatus() { |
| | | let editDate = this.formatDate(new Date()); |
| | | let statusArr = []; |
| | | if (this.engineeringNo === '待开工、未开工、暂停') { |
| | | statusArr = ['待开工', '未开工', '暂停']; |
| | | } else { |
| | | statusArr = [this.engineeringNo]; |
| | | } |
| | | this.$post({ |
| | | url: "/Womdaa/GetWomdaasByEngineeringNo", |
| | | data: { |
| | | machineNo: this.machineNo, |
| | | orderStatus: [this.engineeringNo], // 只传选中的状态 |
| | | orderStatus: statusArr, |
| | | editDate: editDate |
| | | } |
| | | }).then(res => { |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | |
| | | :deep(.checkbox), |
| | | :deep(.checkbox__inner) { |
| | | padding: 10px !important; |
| | | width: 44px !important; |
| | | min-width: 44px !important; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .row-selected { |
| | | background-color: #e0f3ff !important; |
| | | } |
| | | |
| | | .font { |
| | | background-color: #666666; |
| | | height: 30px; |
| | |
| | | flex-direction: column; |
| | | } |
| | | |
| | | /* 顶部机台信息胶囊 */ |
| | | .device-chip { |
| | | .tab-bar { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | min-width: 180px; |
| | | padding: 8px 16px; |
| | | border-radius: 12px; |
| | | background: rgba(30, 58, 95, 0.12); |
| | | border: 1px solid rgba(30, 58, 95, 0.35); |
| | | color: #1e3a5f; |
| | | justify-content: space-around; |
| | | background-color: #f5f5f5; |
| | | padding: 1vh; |
| | | padding-top: 30px; |
| | | border-bottom: 1px solid #ccc; |
| | | } |
| | | |
| | | .device-chip__label { |
| | | font-size: 12px; |
| | | letter-spacing: 0.08em; |
| | | color: rgba(27, 36, 51, 0.65); |
| | | .top-right { |
| | | position: absolute; |
| | | top: 10px; |
| | | right: 50px; |
| | | z-index: 1000; |
| | | } |
| | | |
| | | .device-chip__value { |
| | | font-size: 18px; |
| | | font-weight: 600; |
| | | .refresh-btn { |
| | | padding: 10px; |
| | | background-color: #00A2E9; |
| | | color: white; |
| | | border: none; |
| | | font-size: 1.5vw; |
| | | border-radius: 5px; |
| | | } |
| | | |
| | | /* 顶部导航标签 */ |
| | | .tab-strip { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 16px; |
| | | margin: 24px 0; |
| | | padding: 16px; |
| | | background: rgba(255, 255, 255, 0.9); |
| | | border-radius: 16px; |
| | | border: 1px solid rgba(30, 58, 95, 0.12); |
| | | box-shadow: 0 20px 50px rgba(15, 34, 58, 0.12); |
| | | } |
| | | |
| | | .tab-strip__item { |
| | | .tab-item { |
| | | flex: 1; |
| | | min-width: 140px; |
| | | text-align: center; |
| | | padding: 16px 12px; |
| | | border-radius: 12px; |
| | | background: rgba(30, 58, 95, 0.05); |
| | | color: #1e3a5f; |
| | | margin-right: 0.5vw; |
| | | padding: 1vh; |
| | | border-radius: 0.5vw; |
| | | background-color: #fff; |
| | | color: #007aff; |
| | | cursor: pointer; |
| | | font-size: 18px; |
| | | font-weight: 600; |
| | | letter-spacing: 0.04em; |
| | | transition: all 0.2s ease; |
| | | font-size: 1.8vw; |
| | | /* Increased font size */ |
| | | transition: background-color 0.3s, color 0.3s; |
| | | } |
| | | |
| | | .tab-strip__item:hover { |
| | | background: rgba(27, 127, 233, 0.1); |
| | | box-shadow: inset 0 0 0 1px rgba(27, 127, 233, 0.4); |
| | | } |
| | | |
| | | .tab-strip__item--active { |
| | | background: linear-gradient(135deg, #1e3a5f 0%, #0f223a 100%); |
| | | .tab-item.active { |
| | | background-color: #007aff; |
| | | color: #fff; |
| | | box-shadow: 0 12px 35px rgba(15, 34, 58, 0.35); |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .content { |
| | |
| | | /* Increased font size for content */ |
| | | } |
| | | |
| | | .picker { |
| | | float: left; |
| | | margin-top: 7px; |
| | | margin-left: 10px; |
| | | text-align: center; |
| | | font-size: 100%; |
| | | padding: 5.5px 1px; |
| | | background-color: #f8f8f8; |
| | | border: 2px solid #ccc; |
| | | } |
| | | .picker { |
| | | float: left; |
| | | margin-top: 7px; |
| | | margin-left: 10px; |
| | | text-align: center; |
| | | font-size: 32px !important; // 强制大字体,适配低密度 |
| | | min-height: 60px; // 让选择框高度也变大 |
| | | line-height: 60px; |
| | | padding: 5.5px 1px; |
| | | background-color: #fff; // 这里改为蓝色 |
| | | border: 2px solid #007aff; // 边框也改为蓝色 |
| | | color: #007aff; // 字体颜色改为白色,保证可读性 |
| | | border-radius: 6px; |
| | | transition: background 0.2s; |
| | | } |
| | | |
| | | .th { |
| | | background-color: lightskyblue; |
| | |
| | | /* Increased font size within popups */ |
| | | } |
| | | |
| | | .choose-order-btn { |
| | | margin-left: 12px; |
| | | .print-btn { |
| | | float: left; |
| | | margin-top: 4px; |
| | | margin-left: 10px; |
| | | text-align: center; |
| | | font-size: 100%; |
| | | color: black; |
| | | padding: 0px 90px; |
| | | border: 2px solid #ccc; |
| | | cursor: pointer; |
| | | border-radius: 0.8vw; |
| | | } |
| | | |
| | | .machine-name-box { |
| | | border: 2px solid #e53935; /* 红色边框 */ |
| | | border-radius: 8px; |
| | | font-family: fantasy; |
| | | font-size: 33px; |
| | | margin-top: 20px; |
| | | padding: 15px 48px; /* 上下20px,左右48px,增加内边距 */ |
| | | width: 500px; /* 更宽,保证内容完整显示 */ |
| | | height: 70px; /* 增加高度 */ |
| | | box-sizing: border-box; |
| | | background: #fff; |
| | | color: #222; |
| | | font-weight: bold; |
| | | text-align: left; |
| | | display: block; |
| | | } |
| | | |
| | | |
| | | @media screen and (max-width: 1920px) { |
| | | .tab-strip__item { |
| | | .tab-item { |
| | | font-size: 1.6vw; |
| | | } |
| | | |
| | |
| | | font-size: 1.6vw; |
| | | } |
| | | } |
| | | |
| | | .uni-td, .uni-th, td, th { |
| | | word-break: break-all; |
| | | white-space: normal; |
| | | /* 可选:设置最大宽度,防止撑破表格 */ |
| | | max-width: 180px; |
| | | overflow-wrap: break-word; |
| | | } |
| | | |
| | | /* 针对1280x800的平板使用媒体查询进行适配 */ |
| | | @media screen and (min-width: 1280px) and (max-width: 1920px) { |
| | |
| | | font-size: 20px; |
| | | } |
| | | } |
| | | |
| | | .select-btn { |
| | | width: 180px; // 更宽 |
| | | height: 80px; // 更高 |
| | | font-size: 1.8vw; // 字体也略大 |
| | | border-radius: 10px; |
| | | background-color: #f5f5f5; |
| | | color: #007aff; |
| | | border: 2px solid #007aff; |
| | | margin: 0 auto; |
| | | display: block; |
| | | } |
| | | |
| | | </style> |