| | |
| | | <input class="inp" type="text" v-model="order.daa001" disabled="true" /> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>刀具名称:</label><!--刀具名称???--> |
| | | <label>刀具名称:</label> |
| | | <input class="inp" type="text" v-model="order.moldId" disabled="true" /> |
| | | </view> |
| | | <view class="form-item"> |
| | |
| | | </view> |
| | | <view class="form-row3"> |
| | | <view class="form-item"> |
| | | <label>产品编码:</label><!--产品编码???--> |
| | | <input class="inp" type="text" v-model="order.daa004" disabled="true" /> |
| | | <label>产品编码:</label> |
| | | <input class="inp" type="text" v-model="order.daa002" disabled="true" /> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>产品规格:</label><!--开工数采:开工时的累计生产数???--> |
| | | <input class="inp" type="text" v-model="order.daa004" disabled="true" /> |
| | | <label>产品规格:</label> |
| | | <input class="inp" type="text" v-model="order.daa005" disabled="true" /> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>报工数量:</label> |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | |
| | | this.fetchData(true); |
| | | |
| | | this.sumbit(); |
| | | |
| | | this.init(); |
| | | |
| | | }, |
| | | mounted() { |
| | | this.fetchData(false); // Initial fetch |
| | |
| | | clearInterval(this.timer); // Clear the timer on component destruction |
| | | }, |
| | | methods: { |
| | | |
| | | init() { |
| | | this.$post({ |
| | | url: "/MesOrderSta/init", |
| | |
| | | }); |
| | | }, |
| | | |
| | | |
| | | onDaa003Change(event) { |
| | | |
| | | let orde = this.lineList[this.DAA003List.indexOf(event)]; |
| | | |
| | | this.orderId = orde.id; |
| | | this.orderNo = orde.daa001; |
| | | |
| | | //切换为新的id |
| | | uni.setStorageSync('machine', this.machineNo); |
| | | uni.setStorageSync('orderId', this.orderId); |
| | | uni.setStorageSync('orderNo', this.orderNo); |
| | | |
| | | this.fetchData(false); |
| | | |
| | | this.sumbit(); |
| | | }, |
| | | sumbit() { |
| | | |
| | | this.$post({ |
| | | url: "/MesOrderSta/FindByOrderNo", |
| | | data: { |
| | |
| | | } |
| | | }).then(res => { |
| | | let statusForm = res.data.tbBillList; |
| | | |
| | | this.startTime = res.data.tbBillList.startTime; |
| | | this.endTime = res.data.tbBillList.endTime; |
| | | |
| | | this.productionDuration = "0m"; |
| | | |
| | | if (this.startTime) { |
| | | |
| | | let date1 = new Date(this.startTime); |
| | | let date2 = new Date(); |
| | | if (this.endTime) { |
| | | date2 = new Date(this.endTime); |
| | | } |
| | | |
| | | // 计算两个日期之间的差异(以毫秒为单位) |
| | | let differenceInMilliseconds = date2 - date1; |
| | | |
| | | this.productionDuration = (differenceInMilliseconds / 60000).toFixed(2); |
| | | } |
| | | |
| | |
| | | if (!this.orderId && !this.orderNo) { |
| | | return; |
| | | } |
| | | |
| | | this.getOrderById(); |
| | | this.getSJByOrder(); |
| | | this.getXJByOrder(); |
| | | |
| | | if (flag) { |
| | | this.$post({ |
| | | url: "/Womdaa/GetWomdaasByShow", |
| | |
| | | orderNo: this.orderNo |
| | | } |
| | | }).then(res => { |
| | | |
| | | if (res.data.tbBillList == null) { |
| | | this.$showMessage("工单不存在或者未开工,请检查"); |
| | | // 保证order为对象,避免模板报错 |
| | |
| | | daa008: '', |
| | | daa004: '', |
| | | daa003: '', |
| | | daa002: '', |
| | | daa005: '', |
| | | daa011: '', |
| | | daa018: '', |
| | | machineNo: '', |
| | |
| | | }; |
| | | return; |
| | | } |
| | | |
| | | this.order = res.data.tbBillList; |
| | | |
| | | uni.setStorageSync('engineeringNo', this.order.engineeringNo); |
| | | |
| | | this.orderStatus = this.order.daa018; |
| | | this.collectedAmount = this.order.todayOutput; |
| | | |
| | | if (!this.order.todayOutput) { |
| | | this.collectedAmount = 0; |
| | | } |
| | | |
| | | this.todayRunTime = this.order.todayRunTime; |
| | | if (!this.order.todayRunTime) { |
| | | this.todayRunTime = "0"; |
| | | } |
| | | |
| | | //this.productionDuration = (this.order.todayOnlineTime / 3600).toFixed(2) + "h"; |
| | | this.todayFaultNum = this.order.todayFaultNum; |
| | | this.utilizationRate = this.order.jdl + '%'; |
| | |
| | | margin-top: -13px; |
| | | line-height: 48px; |
| | | align-content: flex-start; |
| | | |
| | | } |
| | | |
| | | .form-row3 { |