| | |
| | | <view class="tab-item" :class="{ active: currentTab === 0 }" @click="changeTab(0)"> |
| | | 主界面 |
| | | </view> |
| | | <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-item" :class="{ active: currentTab === 2 }" @click="changeTab(2)"> |
| | | 刀具管理 |
| | | <view class="tab-item" :class="{ active: currentTab === 10 }" @click="changeTab(10)"> |
| | | 上下刀/首检单记录 |
| | | </view> |
| | | <view class="tab-item" :class="{ active: currentTab === 4 }" @click="changeTab(4)"> |
| | | 生产报工 |
| | | </view> |
| | | <!-- <view class="tab-item" :class="{ active: currentTab === 1 }" @click="changeTab(1)"> |
| | | <view class="tab-item" :class="{ active: currentTab === 1 }" @click="changeTab(1)"> |
| | | 开工完工 |
| | | </view> --> |
| | | </view> |
| | | <view class="tab-item" :class="{ active: currentTab === 5 }" @click="changeTab(5)"> |
| | | e-SOP |
| | | </view> |
| | |
| | | 设备点检 |
| | | </view> |
| | | <!-- <view class="tab-item" :class="{ active: currentTab === 8 }" @click="changeTab(8)"> |
| | | 打印机设置 |
| | | </view> --> |
| | | 打印机设置 |
| | | </view> --> |
| | | |
| | | </view> |
| | | <view class="font"></view> |
| | | <scroll-view class="content"> |
| | | <view v-if="currentTab === 7" class="tab-content"> |
| | | <view class="content"> |
| | | <view class="top-right"> |
| | | <!--<view class="top-right"> |
| | | <button class="refresh-btn" @click="refresh">刷新</button> |
| | | </view> |
| | | <!--<view> |
| | | <h4>一台机台只能选择一条工单(多选默认为最后一条)</h4> |
| | | </view>--> |
| | | <view> |
| | | <h4>一台机台只能选择一条工单(多选默认为最后一条)</h4> |
| | | </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" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-row"> |
| | | <view> |
| | | <label style="float: left;font-family: fantasy;font-size: 33px;margin-top: 20px;">第一步选择工单:</label> |
| | | <view class="form-row align-row"> |
| | | <input v-model="machineName" |
| | | disabled="true" |
| | | type="text" |
| | | class="machine-name-box" /> |
| | | <view class="form-group"> |
| | | <label class="order-label">第一步选择工单:</label> |
| | | <button class="print-btn" @click="isShowTab">选择工单</button> |
| | | </view> |
| | | <view class="top-right"> |
| | | <button class="refresh-btn" @click="refresh">刷新</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="section card"> |
| | | <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-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"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.procName" /><!--工序--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa001" /><!--工单号--> |
| | | <div class="form-input">{{ item.daa001 }}</div><!--工单号--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa002" /><!--产品编码--> |
| | | <div class="form-input">{{ item.daa002 }}</div><!--产品编码--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003" /><!--产品名称--> |
| | | <div class="form-input">{{ item.daa003 }}</div><!--产品名称--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa004" /><!--规格--> |
| | | <div class="form-input">{{ item.daa004 }}</div><!--规格--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa011" /><!--已生产数量--> |
| | |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--派工数量--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--工单数量--> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--工单数量--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa018" /><!--工单状态--> |
| | |
| | | <uni-td> |
| | | <view class="uni-group"> |
| | | <button class="select-btn" type="default" @click="toDetail(item)"> |
| | | 选择 |
| | | 转到主界面 |
| | | </button> |
| | | </view> |
| | | </uni-td> |
| | |
| | | |
| | | <view> |
| | | <!--<text style="color: red;"> |
| | | 说明:只能同时开工一个工单。选择完成,点击保存选择。系统保留选中的工单。 |
| | | 如果要重选,点击清空重选功能。 |
| | | </text>--> |
| | | 说明:只能同时开工一个工单。选择完成,点击保存选择。系统保留选中的工单。 |
| | | 如果要重选,点击清空重选功能。 |
| | | </text>--> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <view v-if="currentTab === 3" class="tab-content"> |
| | | <!-- <!– 调用 mold 组件 –>--> |
| | | <machine :orderId="orderId" :orderNo="selectedOrder" :machineNo="machineNo" /> |
| | | </view> |
| | | <view v-if="currentTab === 10" class="tab-content"> |
| | | <!-- 调用 moldRecord 组件 --> |
| | | <MoldRecord :orderId="orderId" :orderNo="selectedOrder" :machineNo="machineNo" /> |
| | | </view> |
| | | <view v-if="currentTab === 4" class="tab-content"> |
| | | <!-- 调用 mold 组件 --> |
| | |
| | | <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;font-size: 22px;">点击按钮筛选工单状态:</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> |
| | | |
| | | <div style="height: 400px; overflow: auto;"> |
| | | <div style="height: 450px; overflow: auto;"> <!-- 调整高度为380px,为底部按钮留出更多空间 --> |
| | | <table> |
| | | |
| | | <view class="section card"> |
| | | <uni-table ref="table" type="selection" border stripe emptyText="暂无更多数据" |
| | | @selection-change="selectionChange"> |
| | | class="large-selection-table" @selection-change="selectionChange"> |
| | | <uni-tr> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">工序</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">工单号</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">产品编码</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">产品名称</uni-th> |
| | | <uni-th align="center" class="th" style="color: #FFFFFF">规格</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-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-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-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"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa001" /> |
| | | <div class="form-input">{{ item.daa001 }}</div> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa002" /> |
| | | <div class="form-input">{{ item.daa002 }}</div> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa003" /><!--产品名称--> |
| | | <div class="form-input">{{ item.daa003 }}</div> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa004" /><!--规格--> |
| | | <div class="form-input">{{ item.daa004 }}</div><!--规格--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa011" /><!--已生产数量--> |
| | |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--派工数量--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--工单数量--> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa008" /><!--工单数量--> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <input class="form-input" disabled="true" type="text" v-model="item.daa018" /><!--工单状态--> |
| | | </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> |
| | |
| | | import PrintInit from "../components/PrintInit.vue"; |
| | | import PrintTest from "../components/PrintTest.vue"; |
| | | import EquipmentInspection from "../components/EquipmentInspection.vue"; |
| | | import MoldRecord from "../pages/moldRecord.vue"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | PDFShow, |
| | | PrintInit, |
| | | PrintTest, |
| | | EquipmentInspection |
| | | EquipmentInspection, |
| | | MoldRecord |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | 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({ |
| | | url: "/DevMachine/getAppUpgradeInfo", |
| | |
| | | getPrintInfo() { |
| | | var mac = ""; |
| | | |
| | | mac = "74:24:ca:4f:b7:9b"; |
| | | mac = "74:24:ca:4f:b2:c3"; |
| | | this.$post({ |
| | | url: "/DevMachine/GetDevMachineByPdaMac", |
| | | data: { |
| | |
| | | return; |
| | | |
| | | |
| | | if (plus.os.name == "Android") { |
| | | //获取手机MAC地址 |
| | | var Context = plus.android.importClass("android.content.Context"); |
| | | var WifiManager = plus.android.importClass("android.net.wifi.WifiManager"); |
| | | var wifiManager = plus.android.runtimeMainActivity().getSystemService(Context.WIFI_SERVICE); |
| | | var WifiInfo = plus.android.importClass("android.net.wifi.WifiInfo"); |
| | | var wifiInfo = wifiManager.getConnectionInfo(); |
| | | mac = wifiInfo.getMacAddress(); |
| | | // if (plus.os.name == "Android") { |
| | | // //获取手机MAC地址 |
| | | // var Context = plus.android.importClass("android.content.Context"); |
| | | // var WifiManager = plus.android.importClass("android.net.wifi.WifiManager"); |
| | | // var wifiManager = plus.android.runtimeMainActivity().getSystemService(Context.WIFI_SERVICE); |
| | | // var WifiInfo = plus.android.importClass("android.net.wifi.WifiInfo"); |
| | | // var wifiInfo = wifiManager.getConnectionInfo(); |
| | | // mac = wifiInfo.getMacAddress(); |
| | | |
| | | //如果mac为“02:00:00:00:00:00”,则可能是安卓6.0以上版本,则使用另一种方法获取mac地址 |
| | | if (mac == "02:00:00:00:00:00") { |
| | | mac = this.getMacNew(); |
| | | } |
| | | //如果mac使用新方法依然是“02:00:00:00:00:00”则不进行保存 |
| | | if (mac == "02:00:00:00:00:00") { |
| | | return; |
| | | } |
| | | uni.setStorageSync('pdaMac', mac); |
| | | // //如果mac为“02:00:00:00:00:00”,则可能是安卓6.0以上版本,则使用另一种方法获取mac地址 |
| | | // if (mac == "02:00:00:00:00:00") { |
| | | // mac = this.getMacNew(); |
| | | // } |
| | | // //如果mac使用新方法依然是“02:00:00:00:00:00”则不进行保存 |
| | | // if (mac == "02:00:00:00:00:00") { |
| | | // return; |
| | | // } |
| | | // uni.setStorageSync('pdaMac', mac); |
| | | |
| | | this.$post({ |
| | | url: "/DevMachine/GetDevMachineByPdaMac", |
| | | data: { |
| | | pdaMac: mac, |
| | | } |
| | | }).then(res => { |
| | | let devMachine = res.data.tbBillList; |
| | | this.machineNo = devMachine.machineNo; |
| | | this.machineName = "当前机台:" + this.machineNo + "号齿轮机"; |
| | | // this.$post({ |
| | | // url: "/DevMachine/GetDevMachineByPdaMac", |
| | | // data: { |
| | | // pdaMac: mac, |
| | | // } |
| | | // }).then(res => { |
| | | // let devMachine = res.data.tbBillList; |
| | | // this.machineNo = devMachine.machineNo; |
| | | // this.machineName = "当前机台:" + this.machineNo + "号齿轮机"; |
| | | |
| | | uni.setStorageSync('machineNo', this.machineNo); |
| | | uni.setStorageSync('printMac', devMachine.printMac); |
| | | // uni.setStorageSync('machineNo', this.machineNo); |
| | | // uni.setStorageSync('printMac', devMachine.printMac); |
| | | |
| | | |
| | | this.getWomdaaIsShow(); |
| | | // this.getWomdaaIsShow(); |
| | | |
| | | }); |
| | | } |
| | | // }); |
| | | // } |
| | | }, |
| | | save() { |
| | | let data = this.selectedItems(); |
| | |
| | | } |
| | | 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'); // 获取月份并补零 |
| | |
| | | if (index === 7) { |
| | | this.refresh(); |
| | | } |
| | | // 重置自动跳转计时器 |
| | | this.resetAutoRedirectTimer(); |
| | | console.log(index); |
| | | }, |
| | | onMachineChange(event) { |
| | |
| | | }) |
| | | }, |
| | | //获取表格的数据源 |
| | | 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) { |
| | | width: 60px !important; |
| | | height: 60px !important; |
| | | min-width: 60px !important; |
| | | min-height: 60px !important; |
| | | padding: 16px !important; |
| | | margin-right: 20px !important; |
| | | } |
| | | |
| | | .popup .large-selection-table { |
| | | width: 100% !important; |
| | | table-layout: auto !important; // 让表格自动分配宽度 |
| | | } |
| | | |
| | | .row-selected { |
| | | background-color: #e0f3ff !important; |
| | | } |
| | | |
| | | .font { |
| | | background-color: #666666; |
| | | height: 30px; |
| | |
| | | } |
| | | |
| | | /* 卡片样式 */ |
| | | .card { |
| | | background-color: #fff; |
| | | border-radius: 10px; |
| | | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); |
| | | padding: 16px; |
| | | position: relative; |
| | | margin-bottom: 25px |
| | | } |
| | | .card { |
| | | background-color: #fff; |
| | | border-radius: 10px; |
| | | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); |
| | | padding: 0; // 去除多余内边距 |
| | | position: relative; |
| | | margin-bottom: 25px; |
| | | width: 100%; // 填满父容器 |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | /* //.content { |
| | | // flex: 1; |
| | | // padding: 1vh 1vw; // 保证整体有左右留白 |
| | | // background-color: white; |
| | | // font-size: 1.5vw; |
| | | //}*/ |
| | | |
| | | /* 卡片标题在左上角 */ |
| | | .card-header { |
| | |
| | | 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 { |
| | |
| | | margin-top: 7px; |
| | | margin-left: 10px; |
| | | text-align: center; |
| | | font-size: 100%; |
| | | font-size: 32px !important; // 强制大字体,适配低密度 |
| | | min-height: 60px; // 让选择框高度也变大 |
| | | line-height: 60px; |
| | | padding: 5.5px 1px; |
| | | background-color: #fff; // 这里改为蓝色 |
| | | border: 2px solid #007aff; // 边框也改为蓝色 |
| | |
| | | transition: background 0.2s; |
| | | } |
| | | |
| | | .th { |
| | | background-color: lightskyblue; |
| | | height: 6vh; |
| | | font-size: 2vw; |
| | | /* Increased font size for table headers */ |
| | | } |
| | | .th { |
| | | background-color: white; |
| | | color: black; |
| | | height: 6vh; |
| | | 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 { |
| | | font-size: 1.8vw; |
| | | /* Increased input font size */ |
| | | } |
| | | .form-input { |
| | | word-break: break-all; |
| | | white-space: normal; |
| | | line-height: 1.4; |
| | | text-align: center; |
| | | vertical-align: middle; |
| | | max-width: 180px; |
| | | overflow-wrap: break-word; |
| | | font-size: 22px; |
| | | padding: 6px 8px; |
| | | background-color: transparent; /* 设置背景为透明 */ |
| | | } |
| | | |
| | | /* 底部保存和取消按钮 */ |
| | | .bottom-section { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | margin-bottom: 2vh; |
| | | padding: 2vh 1vw; |
| | | } |
| | | .bottom-section { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | margin-bottom: 2vh; |
| | | padding: 2vh 1vw; |
| | | margin-top: 20px; // 减小顶部边距,确保按钮在弹窗内正确显示 |
| | | } |
| | | |
| | | .save-btn, |
| | | .cancel-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 { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | .overlay { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | z-index: 2000; // 增加z-index,确保弹窗在刷新按钮之上 |
| | | } |
| | | |
| | | .popup { |
| | | background-color: #fff; |
| | | padding: 2vh; |
| | | border: 1px solid #ccc; |
| | | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
| | | width: 90vw; |
| | | height: 70vh; |
| | | font-size: 1.6vw; |
| | | /* Increased font size within popups */ |
| | | } |
| | | .popup { |
| | | background-color: #fff; |
| | | padding: 2vh 2vh 8vh 2vh; // 增加底部内边距,为按钮留出空间 |
| | | border: 1px solid #ccc; |
| | | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); |
| | | 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 { |
| | | float: left; |
| | | 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; |
| | | } |
| | | |
| | | .machine-name-box { |
| | | border: 2px solid #007aff; /* 蓝色边框 */ |
| | | border-radius: 8px; |
| | | font-family: fantasy; |
| | | font-size: 33px; |
| | | margin-top: 20px; |
| | | padding: 15px 28px; /* 上下20px,左右48px,增加内边距 */ |
| | | width: 300px; /* 更宽,保证内容完整显示 */ |
| | | height: 70px; /* 增加高度 */ |
| | | box-sizing: border-box; |
| | | background: #fff; |
| | | color: #222; |
| | | font-weight: bold; |
| | | text-align: left; |
| | | display: block; |
| | | } |
| | | |
| | | /* //v-deep .checkbox { |
| | | // padding: 10 10px; |
| | | // width: 26px; |
| | | // padding-left: 12px; |
| | | // display: table-cell; |
| | | // vertical-align: middle; |
| | | // color: #333; |
| | | // font-weight: 500; |
| | | // border-bottom: 1px #ebeef5 solid; |
| | | // font-size: 14px; |
| | | //}*/ |
| | | |
| | | .popup .card { |
| | | margin-bottom: 40px !important; // 原来250px,改为40px,空白明显减少 |
| | | } |
| | | |
| | | @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; |
| | | } |
| | | } |
| | | |
| | | .uni-td, |
| | | td { |
| | | white-space: normal !important; // 允许自动换行 |
| | | word-break: break-all !important; // 单词/中文都能断行 |
| | | line-height: 1.4; // 行高适当,便于多行显示 |
| | | text-align: center; // 居中显示(如需左对齐可改为 left) |
| | | vertical-align: middle; // 垂直居中 |
| | | max-width: 180px; // 保持单元格最大宽度 |
| | | overflow-wrap: break-word; // 兼容性更好 |
| | | background-color: transparent; /* 设置背景为透明 */ |
| | | } |
| | | |
| | | // 弹窗内表格样式与生产报工页面历史报工记录表格一致 |
| | | .popup .large-selection-table .uni-th, |
| | | .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: 150px; // 原来的70% (180px * 0.7) |
| | | height: 75px; // 原来的65% (80px * 0.65) |
| | | font-size: 22px; // 字体也略大 |
| | | //font-weight: 200; |
| | | border-radius: 10px; |
| | | 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 { |
| | | position: relative; |
| | | display: flex; |
| | | flex-direction: column; |
| | | margin-bottom: 20px; |
| | | padding: 20px 10px; |
| | | } |
| | | |
| | | .form-row.align-row { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | position: relative; |
| | | width: 100%; |
| | | } |
| | | |
| | | .machine-name-box { |
| | | flex: 1 1 45%; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .form-group { |
| | | display: flex; |
| | | align-items: center; |
| | | flex: 1 1 45%; |
| | | justify-content: flex-start; |
| | | } |
| | | |
| | | .order-label { |
| | | font-family: fantasy; |
| | | font-size: 22px; |
| | | margin-top: 20px; |
| | | margin-right: 10px; |
| | | float: none; |
| | | } |
| | | |
| | | .print-btn { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .top-right { |
| | | position: absolute; |
| | | top: -30px; // 往上移 |
| | | right: 0; |
| | | z-index: 1000; |
| | | } |
| | | |
| | | /* 放大表头和表格内容字体 */ |
| | | .th, |
| | | .uni-th, |
| | | th { |
| | | 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: 22px !important; |
| | | color: black !important; |
| | | } |
| | | |
| | | /* 针对1280x800的平板使用媒体查询进行适配 */ |
| | | @media screen and (min-width: 1280px) and (max-width: 1920px) { |
| | |
| | | |
| | | .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; |
| | | } |
| | | } |
| | | |
| | | .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> |